Lets say I have a plant table:
id fruit 1 banana 2 apple 3 orange
I can do these
SELECT * FROM plant ORDER BY id; SELECT
When you use an aggregate like that, the query gets an implicit group by where the entire result is a single group.
Using an aggregate in order by is only useful if you also have a group by, so that you can have more than one row in the result.