Reputation: 144
I am trying to get the number of users for each age. What is wrong with this sql query for odata.stackoverflow.com?
select age, count(*)
from users
order by age
group by age
Upvotes: 0
Views: 428
Reputation: 332681
Use:
select age,count(*)
from users
group by age
order by age
ORDER BY is always last
Upvotes: 4