mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Add test: ordinary DISTINCT with all const columns
This commit is contained in:
parent
7245ddcc20
commit
baa8b7c158
@ -1,8 +1,16 @@
|
||||
-- { 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
|
||||
|
@ -14,9 +14,13 @@ INSERT INTO distinct (Num, Name) VALUES (7, 'Bill');
|
||||
INSERT INTO distinct (Num, Name) VALUES (7, 'Mary');
|
||||
INSERT INTO distinct (Num, Name) VALUES (7, 'John');
|
||||
|
||||
-- { echoOn }
|
||||
-- String field
|
||||
SELECT Name FROM (SELECT DISTINCT Name FROM distinct) ORDER BY Name;
|
||||
-- Num field
|
||||
SELECT Num FROM (SELECT DISTINCT Num FROM distinct) ORDER BY Num;
|
||||
-- all const columns
|
||||
SELECT DISTINCT 1 as a, 2 as b FROM distinct;
|
||||
-- { echoOff }
|
||||
|
||||
DROP TABLE IF EXISTS distinct;
|
||||
|
Loading…
Reference in New Issue
Block a user