Hi,
i use the GROUP BY in a query, but i would like to get the output not sorted alphabetically and also not by what i am using the query for, but in a self defined pattern.
e.g.:
SELECT status,COUNT(*) FROM day GROUP BY status;
would give me s.th. like:
morning - 56
night - 100
noon - 12
but now i would like to get it sorted like this:
morning - 56
noon - 12
night - 100
is s.th. like this possible directly with the MySQL query?
I know how to do it with php, but if its already possible to do it with the MySQL query, then it would be way better 🙂
Thanks,
earswithfeet