Skip to content

Instantly share code, notes, and snippets.

-- Continuous View
CREATE STREAM s0 (x int);
CREATE CONTINUOUS VIEW cv AS
SELECT x, count(*) FROM s0 GROUP BY x;
INSERT INTO s0 (x)
SELECT x % 10 FROM generate_series(1, 1000) AS x;
-- Continuous Transform
CREATE STREAM s1 (x int);
CREATE CONTINUOUS TRANSFORM ct AS