mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 07:01:59 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
31 lines
516 B
SQL
31 lines
516 B
SQL
SET join_use_nulls = 1;
|
|
|
|
DROP TABLE IF EXISTS null_00549;
|
|
CREATE TABLE null_00549 (k UInt64, a String, b Nullable(String)) ENGINE = Log;
|
|
|
|
INSERT INTO null_00549 SELECT
|
|
k,
|
|
a,
|
|
b
|
|
FROM
|
|
(
|
|
SELECT
|
|
number AS k,
|
|
toString(number) AS a
|
|
FROM system.numbers
|
|
LIMIT 2
|
|
) js1
|
|
ANY LEFT JOIN
|
|
(
|
|
SELECT
|
|
number AS k,
|
|
toString(number) AS b
|
|
FROM system.numbers
|
|
LIMIT 1, 2
|
|
) js2 USING (k)
|
|
ORDER BY k ASC;
|
|
|
|
SELECT * FROM null_00549 ORDER BY k, a, b;
|
|
|
|
DROP TABLE null_00549;
|