skip to Main Content

How to use average() in a query without adding it to groupby – postgresql

I have a hierarchal aggregate that uses below statement CREATE MATERIALIZED VIEW IF NOT EXISTS public.values_summary_five_minutes WITH (timescaledb.continuous,timescaledb.materialized_only = true) AS SELECT variableid, time_bucket(INTERVAL ‘5 minute’, bucket_interval_one_min) AS bucket_interval_five_min, MIN(Min_IntValue) as Min_IntValue, MAX(Max_IntValue) as Max_IntValue, SUM(Sum_IntValue) as Sum_IntValue, COUNT(Count_IntValue) as…

VIEW QUESTION
Back To Top
Search