Hi, I am trying to create a materialized view for a continuous aggregate where I have one hypertable I am trying to join with two normal tables. I am using Postgres 16 on RedHat Linux with Timescale 2.16.0-dev
This is the query (column names generalized):
select time_bucket(interval '1 day', hypertable.time_column) as bucket, hypertable.reftable2id, sum(hypertable.metric_value)
from hypertable join ref_table1 on ref_table1.id = hypertable.reftable1id
join ref_table2 on ref_table2.id = hypertable.reftable2id
group by bucket, hypertable.reftable2id;
What am I doing wrong?