Nikita Fomichev 2024-04-12 00:49:18 +02:00
parent edfdaee247
commit 19b1a8b68f
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1 @@
1234 1234 1234

View File

@ -0,0 +1,17 @@
-- https://github.com/ClickHouse/ClickHouse/issues/29748
SET allow_experimental_analyzer=1;
create table events ( distinct_id String ) engine = Memory;
INSERT INTO events VALUES ('1234'), ('1');
WITH cte1 as (
SELECT '1234' as x
), cte2 as (
SELECT '1234' as x
)
SELECT *
FROM events AS events
JOIN cte2 ON cte2.x = events.distinct_id
JOIN cte1 ON cte1.x = cte2.x
limit 1;