mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-11-29 22:24:02 +00:00
Signed-off-by: discord9 <discord9@163.com> (cherry picked from commit 9df296e65b7e1c45b64c1e48906afa0f02013bce)
19 lines
332 B
SQL
19 lines
332 B
SQL
CREATE TABLE tql_view_source(
|
|
ts TIMESTAMP TIME INDEX,
|
|
host STRING,
|
|
val DOUBLE,
|
|
PRIMARY KEY (host)
|
|
);
|
|
|
|
INSERT INTO tql_view_source VALUES (0, 'a', 2);
|
|
|
|
CREATE VIEW tql_view AS TQL EVAL (0, 0, '1s', '5m') tql_view_source;
|
|
|
|
SELECT * FROM tql_view;
|
|
|
|
SHOW CREATE VIEW tql_view;
|
|
|
|
DROP VIEW tql_view;
|
|
|
|
DROP TABLE tql_view_source;
|