CREATE MATERIALIZED VIEW current_aggregate_view
WITH
(timescaledb.continuous) AS
SELECT
time_bucket (INTERVAL '1 hour', time_slot) AS time_slot,
(
SELECT
COALESCE(JSONB_OBJECT_AGG(A, COUNT), '{}'::jsonb)
FROM
(
SELECT
A,
COUNT(DISTINCT C) AS COUNT
FROM
another_aggregate_view
GROUP BY
A,
B
) AS A_kv
) AS A
FROM
another_aggregate_view
GROUP BY
1,
D,
E
WITH
no data;
Hi all,
I met error here:
ERROR: CTEs, subqueries and set-returning functions are not supported by continuous aggregates.invalid continuous aggregate query
ERROR: invalid continuous aggregate query
SQL state: 0A000
Detail: CTEs, subqueries and set-returning functions are not supported by continuous aggregates.
Any suggestions?