mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 21:51:57 +00:00
Added sorting test cases
This commit is contained in:
parent
ff73f74612
commit
e83ab30f18
@ -49,6 +49,46 @@ Peter Nara
|
||||
Theodore Diaz Bachelors
|
||||
Stephanie Cox Bachelors
|
||||
Peter Nara Graduate Degree
|
||||
-- Query with desc sort --
|
||||
Theodore
|
||||
Stephanie
|
||||
Peter
|
||||
Latoya
|
||||
Joshua
|
||||
Skilled Manual
|
||||
Skilled Manual
|
||||
Skilled Manual
|
||||
Skilled Manual
|
||||
Professional
|
||||
-- Query with asc sort --
|
||||
Management
|
||||
Professional
|
||||
Professional
|
||||
Professional
|
||||
Professional
|
||||
-- Query with sort (without keyword asc desc) --
|
||||
Theodore
|
||||
Stephanie
|
||||
Peter
|
||||
Latoya
|
||||
Joshua
|
||||
Skilled Manual
|
||||
Skilled Manual
|
||||
Skilled Manual
|
||||
Skilled Manual
|
||||
Professional
|
||||
-- Query with sort 2 Columns with different direction --
|
||||
Stephanie Cox Management
|
||||
Dalton Wood Professional
|
||||
Angel Stewart Professional
|
||||
Latoya Shen Professional
|
||||
Cameron Rodriguez Professional
|
||||
-- Query with second sort --
|
||||
Stephanie Cox Management
|
||||
Dalton Wood Professional
|
||||
Angel Stewart Professional
|
||||
Latoya Shen Professional
|
||||
Cameron Rodriguez Professional
|
||||
-- Test String Equals (==) --
|
||||
Theodore Diaz Skilled Manual
|
||||
Peter Nara Skilled Manual
|
||||
@ -98,14 +138,3 @@ Christine Nara Skilled Manual Partial College 33
|
||||
-- Test Filter using multi where --
|
||||
Dalton Wood Professional Partial College 42
|
||||
Angel Stewart Professional Partial College 46
|
||||
-- test sort, order --
|
||||
Angel Stewart Professional Partial College 46
|
||||
Dalton Wood Professional Partial College 42
|
||||
Edward Hernandez Skilled Manual High School 36
|
||||
Christine Nara Skilled Manual Partial College 33
|
||||
Stephanie Cox Management Bachelors 33
|
||||
Cameron Rodriguez Professional Partial College 28
|
||||
Theodore Diaz Skilled Manual Bachelors 28
|
||||
Joshua Lee Professional Partial College 26
|
||||
Peter Nara Skilled Manual Graduate Degree 26
|
||||
Latoya Shen Professional Graduate Degree 25
|
||||
|
@ -46,33 +46,32 @@ Select '-- Query has second Column selection with extra column --';
|
||||
set dialect='kusto';
|
||||
Customers| project FirstName,LastName,Occupation | take 3 | project FirstName,LastName,Education;
|
||||
|
||||
-- set dialect='clickhouse';
|
||||
-- Select '-- Query with desc sort --';
|
||||
-- set dialect='kusto';
|
||||
-- Customers | project FirstName,LastName,Occupation | take 5 | sort by FirstName desc;
|
||||
-- Customers | project FirstName,LastName,Occupation | take 5 | order by Occupation desc;
|
||||
set dialect='clickhouse';
|
||||
Select '-- Query with desc sort --';
|
||||
set dialect='kusto';
|
||||
Customers | project FirstName | take 5 | sort by FirstName desc;
|
||||
Customers | project Occupation | take 5 | order by Occupation desc;
|
||||
|
||||
-- set dialect='clickhouse';
|
||||
-- Select '-- Query with asc sort --';
|
||||
-- set dialect='kusto';
|
||||
-- Customers | project FirstName,LastName,Occupation | take 5 | sort by Occupation asc;
|
||||
set dialect='clickhouse';
|
||||
Select '-- Query with asc sort --';
|
||||
set dialect='kusto';
|
||||
Customers | project Occupation | take 5 | sort by Occupation asc;
|
||||
|
||||
-- set dialect='clickhouse';
|
||||
-- Select '-- Query with sort (without keyword asc desc) --';
|
||||
-- set dialect='kusto';
|
||||
-- Customers | project FirstName,LastName,Occupation | take 5 | sort by FirstName;
|
||||
-- Customers | project FirstName,LastName,Occupation | take 5 | order by Occupation;
|
||||
set dialect='clickhouse';
|
||||
Select '-- Query with sort (without keyword asc desc) --';
|
||||
set dialect='kusto';
|
||||
Customers | project FirstName | take 5 | sort by FirstName;
|
||||
Customers | project Occupation | take 5 | order by Occupation;
|
||||
|
||||
-- set dialect='clickhouse';
|
||||
-- Select '-- Query with sort 2 Columns with different direction --';
|
||||
-- set dialect='kusto';
|
||||
-- Customers | project FirstName,LastName,Occupation | take 5 |sort by Occupation asc, LastName desc;
|
||||
|
||||
-- set dialect='clickhouse';
|
||||
-- Select '-- Query with second sort --';
|
||||
-- set dialect='kusto';
|
||||
-- Customers | project FirstName,LastName,Occupation | take 5 |sort by Occupation desc |sort by Occupation asc;
|
||||
set dialect='clickhouse';
|
||||
Select '-- Query with sort 2 Columns with different direction --';
|
||||
set dialect='kusto';
|
||||
Customers | project FirstName,LastName,Occupation | take 5 | sort by Occupation asc, LastName desc;
|
||||
|
||||
set dialect='clickhouse';
|
||||
Select '-- Query with second sort --';
|
||||
set dialect='kusto';
|
||||
Customers | project FirstName,LastName,Occupation | take 5 | sort by Occupation desc |sort by Occupation asc, LastName desc;
|
||||
|
||||
set dialect='clickhouse';
|
||||
Select '-- Test String Equals (==) --';
|
||||
@ -119,15 +118,7 @@ Select '-- Test Filter using numerical great and less (> , <) --';
|
||||
set dialect='kusto';
|
||||
Customers | project FirstName,LastName,Occupation,Education,Age | where Age > 30 and Age < 40;
|
||||
|
||||
|
||||
set dialect='clickhouse';
|
||||
Select '-- Test Filter using multi where --';
|
||||
set dialect='kusto';
|
||||
Customers | project FirstName,LastName,Occupation,Education,Age | where Age > 30 | where Occupation == 'Professional';
|
||||
|
||||
-- TODO: verify the issue that order by can not be followed by other statements
|
||||
set dialect='clickhouse';
|
||||
Select '-- test sort, order --';
|
||||
set dialect='kusto';
|
||||
Customers | order by Age desc, FirstName asc;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user