By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| installed_version |
|---|
| 2.11.1 |
SELECT 1
| variableid | intvalue | created_at |
|---|---|---|
| 1 | 1 | 2023-09-27 12:40:00+00 |
| 1 | 2 | 2023-09-27 12:41:00+00 |
| 1 | 2 | 2023-09-27 12:41:00+00 |
| 1 | 3 | 2023-09-27 12:42:00+00 |
| 1 | 3 | 2023-09-27 12:42:00+00 |
| 1 | 3 | 2023-09-27 12:42:00+00 |
| 1 | 4 | 2023-09-27 12:43:00+00 |
| 1 | 4 | 2023-09-27 12:43:00+00 |
| 1 | 4 | 2023-09-27 12:43:00+00 |
| 1 | 4 | 2023-09-27 12:43:00+00 |
| 1 | 5 | 2023-09-27 12:44:00+00 |
| 1 | 5 | 2023-09-27 12:44:00+00 |
| 1 | 5 | 2023-09-27 12:44:00+00 |
| 1 | 5 | 2023-09-27 12:44:00+00 |
| 1 | 5 | 2023-09-27 12:44:00+00 |
INSERT 0 15
CREATE MATERIALIZED VIEW
| variableid | bucket_interval_one_min | min_intvalue | max_intvalue | sum_intvalue | count_intvalue | statsagg_intvalue |
|---|---|---|---|---|---|---|
| 1 | 2023-09-27 12:40:00+00 | 1 | 1 | 1 | 1 | (version:1,n:1,sx:1,sx2:0,sx3:0,sx4:0) |
| 1 | 2023-09-27 12:41:00+00 | 2 | 2 | 4 | 2 | (version:1,n:2,sx:4,sx2:0,sx3:0,sx4:0) |
| 1 | 2023-09-27 12:42:00+00 | 3 | 3 | 9 | 3 | (version:1,n:3,sx:9,sx2:0,sx3:0,sx4:0) |
| 1 | 2023-09-27 12:43:00+00 | 4 | 4 | 16 | 4 | (version:1,n:4,sx:16,sx2:0,sx3:0,sx4:0) |
| 1 | 2023-09-27 12:44:00+00 | 5 | 5 | 25 | 5 | (version:1,n:5,sx:25,sx2:0,sx3:0,sx4:0) |
SELECT 5
CREATE MATERIALIZED VIEW
| variableid | bucket_interval_five_min | min_intvalue | max_intvalue | sum_intvalue | count_intvalue | avg_intvalue | avg_1minavg_intvalue |
|---|---|---|---|---|---|---|---|
| 1 | 2023-09-27 12:40:00+00 | 1 | 5 | 55 | 5 | 3.6666666666666665 | 3 |
SELECT 1