Files
ems/db/views/R__071_vw_telemetry_15m_7d.sql
2026-04-19 20:15:46 +02:00

20 lines
850 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- =============================================================
-- R__071_vw_telemetry_15m_7d.sql
-- EMS Platform telemetrie střídače po 15 min (dashboard sloty)
-- Repeatable migration jedna aktuální definice view
-- =============================================================
-- Zdroj: continuous aggregate ems.telemetry_inverter_15m (V039).
-- security_invoker=false: PostgREST ems_anon čte bez GRANT na podkladový CA.
CREATE OR REPLACE VIEW ems.vw_telemetry_15m_7d
WITH (security_invoker = false)
AS
SELECT *
FROM ems.telemetry_inverter_15m
WHERE slot_start >= now() - INTERVAL '7 days'
ORDER BY slot_start DESC;
COMMENT ON VIEW ems.vw_telemetry_15m_7d IS
'Telemetrie střídače po 15 min za 7 dní (zdroj: telemetry_inverter_15m).
security_invoker=false: čtení přes PostgREST role ems_anon bez GRANT na podkladový CA.';