ClickHouse/tests/queries/0_stateless/01632_select_all_syntax.sql
feng lv 5f962015ca fix
fix style

fix build
2021-01-11 04:28:22 +00:00

26 lines
806 B
SQL

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);
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);
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);