MySQL Error 3028 – ER_AGGREGATE_ORDER_FOR_UNION

MySQL Error Message

Expression #%u of ORDER BY contains aggregate function
and applies to a UNION, EXCEPT or INTERSECT