mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-16 20:53:27 +00:00
18 lines
267 B
MySQL
18 lines
267 B
MySQL
|
SELECT
|
||
|
key1,
|
||
|
key2,
|
||
|
table_1
|
||
|
FROM
|
||
|
(
|
||
|
SELECT
|
||
|
arrayJoin([1, 2, 3]) AS key1,
|
||
|
0 AS key2,
|
||
|
999 AS table_1
|
||
|
) ALL INNER JOIN
|
||
|
(
|
||
|
SELECT
|
||
|
arrayJoin([1, 3, 2]) AS key1,
|
||
|
0 AS key2,
|
||
|
999 AS table_1
|
||
|
) USING key2, key1;
|