ClickHouse/dbms/tests/queries/0_stateless/00056_join_number_string.sql
2016-06-07 11:23:15 +03:00

10 lines
263 B
SQL

SELECT left, right FROM
(
SELECT number % 4 AS k1, toString(number % 3) AS k2, number AS left FROM system.numbers LIMIT 10
)
ALL LEFT JOIN
(
SELECT number % 2 AS k1, toString(number % 6) AS k2, number AS right FROM system.numbers LIMIT 10
)
USING k1, k2;