ClickHouse/tests/queries/0_stateless/03248_with_insert.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
384 B
MySQL
Raw Normal View History

2024-10-11 20:33:25 +00:00
DROP TABLE IF EXISTS x;
CREATE TABLE x ENGINE = Log AS SELECT * FROM numbers(0);
SYSTEM STOP MERGES x;
WITH y AS
(
SELECT *
FROM numbers(10)
)
INSERT INTO x
SELECT *
FROM y
INTERSECT
SELECT *
FROM numbers(5);
WITH y AS
(
SELECT *
FROM numbers(10)
)
INSERT INTO x
SELECT *
FROM numbers(5)
INTERSECT
SELECT *
FROM y;
SELECT * FROM x;