ClickHouse/tests/queries/0_stateless/00055_join_two_numbers.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
272 B
MySQL
Raw Normal View History

2014-06-19 19:11:42 +00:00
SELECT left, right FROM
(
SELECT number % 4 AS k1, number % 3 AS k2, number AS left FROM system.numbers LIMIT 10
) js1
2014-06-19 19:11:42 +00:00
ALL LEFT JOIN
(
SELECT number % 2 AS k1, number % 6 AS k2, number AS right FROM system.numbers LIMIT 10
) js2
2019-09-19 14:53:03 +00:00
USING k1, k2
ORDER BY left, right;