Update 01936_empty_function_support_uuid.sql

This commit is contained in:
alexey-milovidov 2021-07-04 18:13:20 +03:00 committed by GitHub
parent faa174c6c4
commit 91aa1e6c7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,15 +14,14 @@ INSERT INTO uuid_empty.users VALUES ('00000000-0000-0000-0000-000000000001');
INSERT INTO uuid_empty.users VALUES ('00000000-0000-0000-0000-000000000002');
INSERT INTO uuid_empty.orders VALUES ('00000000-0000-0000-0000-000000000003', '00000000-0000-0000-0000-000000000001');
SET joined_subquery_requires_alias = 0;
SELECT
uniq(user_id) AS users,
uniqIf(order_id, notEmpty(order_id)) AS orders
FROM
(
SELECT * FROM uuid_empty.users
) ALL LEFT JOIN (
) t1 ALL LEFT JOIN (
SELECT * FROM uuid_empty.orders
) USING (user_id);
) t2 USING (user_id);
DROP DATABASE uuid_empty;