mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 11:22:12 +00:00
18 lines
357 B
SQL
18 lines
357 B
SQL
-- https://github.com/ClickHouse/ClickHouse/issues/37141
|
|
|
|
WITH (SELECT 1) as v0
|
|
SELECT v0, v > 0 FROM (
|
|
WITH (SELECT 1) AS v1, (SELECT 2) AS v2
|
|
SELECT v1 AS v
|
|
UNION ALL
|
|
SELECT v2 AS v
|
|
) AS a;
|
|
|
|
SELECT number FROM numbers(10)
|
|
WHERE number IN (
|
|
WITH (SELECT 1) AS v1, (SELECT 2) AS v2
|
|
SELECT v1 AS v
|
|
UNION ALL
|
|
SELECT v2 AS v
|
|
);
|