ClickHouse/tests/queries/0_stateless/00057_join_aliases.sql
2023-03-01 18:03:41 +01:00

8 lines
329 B
SQL

SELECT * FROM (
SELECT number, n, j1, j2
FROM (SELECT number, number / 2 AS n FROM system.numbers) js1
ANY LEFT JOIN (SELECT number / 3 AS n, number AS j1, 'Hello' AS j2 FROM system.numbers LIMIT 10) js2
USING n LIMIT 10
) ORDER BY n
SETTINGS join_algorithm = 'hash'; -- the query does not finish with merge join