num_elements()
For more information about counter aggregation functions, see the hyperfunctions documentation.
Name | Type | Description |
---|---|---|
num_elements | BIGINT | The number of points seen during the counter_agg call |
SELECT
id,
num_elements(summary)
FROM (
SELECT
id,
time_bucket('15 min'::interval, ts) AS bucket,
counter_agg(ts, val) AS summary
FROM foo
GROUP BY id, time_bucket('15 min'::interval, ts)