ClickHouse/tests/queries/0_stateless/00413_distinct.reference
2022-12-13 12:48:14 +01:00

17 lines
274 B
Plaintext

-- { echoOn }
-- String field
SELECT Name FROM (SELECT DISTINCT Name FROM distinct) ORDER BY Name;
Bill
John
Mary
-- Num field
SELECT Num FROM (SELECT DISTINCT Num FROM distinct) ORDER BY Num;
1
3
4
5
7
-- all const columns
SELECT DISTINCT 1 as a, 2 as b FROM distinct;
1 2