mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-13 19:14:30 +00:00
11 lines
272 B
SQL
11 lines
272 B
SQL
SELECT left, right FROM
|
|
(
|
|
SELECT number % 4 AS k1, number % 3 AS k2, number AS left FROM system.numbers LIMIT 10
|
|
) js1
|
|
ALL LEFT JOIN
|
|
(
|
|
SELECT number % 2 AS k1, number % 6 AS k2, number AS right FROM system.numbers LIMIT 10
|
|
) js2
|
|
USING k1, k2
|
|
ORDER BY left, right;
|