ClickHouse/tests/queries/0_stateless/01632_select_all_syntax.sql

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

26 lines
806 B
MySQL
Raw Normal View History

2021-01-04 14:23:17 +00:00
SELECT ALL 'a';
SELECT DISTINCT 'a';
SELECT ALL * FROM (SELECT 1 UNION ALL SELECT 1);
SELECT DISTINCT * FROM (SELECT 2 UNION ALL SELECT 2);
SELECT sum(number) FROM numbers(10);
SELECT sum(ALL number) FROM numbers(10);
2021-01-04 15:05:27 +00:00
SELECT sum(DISTINCT number) FROM numbers(10);
SELECT sum(ALL x) FROM (SELECT 1 x UNION ALL SELECT 1);
SELECT sum(DISTINCT x) FROM (SELECT 1 x UNION ALL SELECT 1);
2021-01-10 14:51:06 +00:00
SELECT sum(ALL) FROM (SELECT 1 AS ALL);
SELECT sum(DISTINCT) FROM (SELECT 1 AS DISTINCT);
SELECT repeat('a', ALL) FROM (SELECT number AS ALL FROM numbers(10));
SELECT repeat('a', DISTINCT) FROM (SELECT number AS DISTINCT FROM numbers(10));
SELECT repeat(ALL, 5) FROM (SELECT 'a' AS ALL);
SELECT repeat(DISTINCT, 5) FROM (SELECT 'a' AS DISTINCT);
SELECT repeat(ALL, DISTINCT) FROM (SELECT 'a' AS ALL, 5 AS DISTINCT);