ClickHouse/tests/queries/0_stateless/03236_create_query_ttl_where.sql
2024-09-18 15:15:52 +00:00

18 lines
264 B
SQL

DROP TABLE IF EXISTS ttl;
CREATE TABLE ttl
(
`a` UInt32,
`timestamp` DateTime
)
ENGINE = MergeTree
ORDER BY a
TTL timestamp + toIntervalSecond(2) WHERE a IN (
SELECT number
FROM system.numbers
LIMIT 100000
);
SHOW CREATE ttl;
DROP TABLE ttl;