ClickHouse/tests/queries/0_stateless/00056_join_number_string.sql
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

11 lines
292 B
SQL

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