mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
17 lines
274 B
Plaintext
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
|