table-test-average-state
INSERT INTO cycling.test_average_state (
id, state, val
) VALUES (
1, (6, 9949), 51
);
INSERT INTO cycling.test_average_state (
id, state, val
) VALUES (
2, (79, 10000), 9999
);
SELECT state, average_state(state, val), val FROM cycling.test_average_state;
CREATE TABLE IF NOT EXISTS cycling.test_average_state (
id int PRIMARY KEY,
state frozen<tuple<int, bigint>>,
val int
);
DROP TABLE IF EXISTS cycling.test_average_state;