Skip to content

Commit a305938

Browse files
committed
integration tests order by aggregation function
1 parent 11ac9c1 commit a305938

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

x-pack/plugin/sql/qa/src/main/resources/agg-ordering.csv-spec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
aggSumWithColumnRepeatedWithOrderAsc
2-
SELECT gender AS g, gender, SUM(salary) AS s3, SUM(salary), SUM(salary) AS s5 FROM test_emp GROUP BY gender ORDER BY gender;
2+
SELECT gender AS g, gender, SUM(salary) AS s3, SUM(salary), SUM(salary) AS s5 FROM test_emp GROUP BY gender ORDER BY SUM(salary);
33

44
g:s | gender:s | s3:i | SUM(salary):i | s5:i
55
null |null |487605 |487605 |487605
@@ -8,7 +8,7 @@ M |M |2671054|2671054 |2671054
88
;
99

1010
aggSumWithAliasWithColumnRepeatedWithOrderDesc
11-
SELECT gender AS g, gender, SUM(salary) AS s3, SUM(salary), SUM(salary) AS s5 FROM test_emp GROUP BY g ORDER BY g DESC;
11+
SELECT gender AS g, gender, SUM(salary) AS s3, SUM(salary), SUM(salary) AS s5 FROM test_emp GROUP BY g ORDER BY s5 DESC;
1212

1313
g:s | gender:s | s3:i | SUM(salary):i | s5:i
1414
M |M |2671054|2671054 |2671054
@@ -17,7 +17,7 @@ null |null |487605 |487605 |487605
1717
;
1818

1919
aggSumWithNumericRefWithColumnRepeatedWithOrderDesc
20-
SELECT gender AS g, gender, SUM(salary) AS s3, SUM(salary), SUM(salary) AS s5 FROM test_emp GROUP BY 2 ORDER BY 2 DESC;
20+
SELECT gender AS g, gender, SUM(salary) AS s3, SUM(salary), SUM(salary) AS s5 FROM test_emp GROUP BY 2 ORDER BY 3 DESC;
2121

2222
g:s | gender:s | s3:i | SUM(salary):i | s5:i
2323
M |M |2671054|2671054 |2671054

0 commit comments

Comments
 (0)