So, when your query specification has an explicit GROUP BY, your choices in what to use in post-grouping clauses (SELECT, HAVING, ORDER BY) are limited. You can only use aggregate functions, expressions in the GROUP BY list, or constants. An interesting
Read More...