In Postgres, I can say select avg(size) from images and select max(size) from images.
But when I want the mode, I may not do this:
select mode(uploaded_by_id) from images
Instead I must do this:
select mode() within group (order by uploaded_by_id desc) from images
The syntax seems a little funky to me. Does anyone know why the other syntax was not permitted?
NOTE: I know that allowing order by enables the user to define which mode to take in the case of a tie, but I don't see why that needs to prohibit the other syntax entirely.
Thanks!