ClickHouse/tests/queries/0_stateless/00057_join_aliases.sql

8 lines
329 B
MySQL
Raw Normal View History

2022-06-07 13:59:30 +00:00
SELECT * FROM (
2023-02-16 10:34:36 +00:00
SELECT number, n, j1, j2
FROM (SELECT number, number / 2 AS n FROM system.numbers) js1
2022-06-07 13:59:30 +00:00
ANY LEFT JOIN (SELECT number / 3 AS n, number AS j1, 'Hello' AS j2 FROM system.numbers LIMIT 10) js2
USING n LIMIT 10
2022-12-26 15:46:51 +00:00
) ORDER BY n
SETTINGS join_algorithm = 'hash'; -- the query does not finish with merge join