-
Notifications
You must be signed in to change notification settings - Fork 25.8k
SQL: ORDER BY COUNT(*) should display an error message #34590
Copy link
Copy link
Closed
Labels
Description
The following behavior should return an error message about the limitations of ORDER BY, but instead is returning some seemingly incorrect results:
sql> select languages,count(*) from test_emp group by languages having count(*) > 10 order by count(emp_no);
languages | COUNT(1)
---------------+---------------
1 |15
2 |19
3 |17
4 |18
5 |21
composite aggregation (what is used in any group by sql statements) cannot order on something else other than the key itself (in this case - languages). But, instead of returning an error message, it gives the false impression that the results are incorrect.
Related to #31860.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.