I see that in SQL, the GROUP BY has to precede ORDER BY expression. Does this imply that ordering is done after grouping discards identical rows/columns?
Because I s
SELECT DISTINCT a,b FROM tbl t WHERE b = (SELECT MAX(b) FROM tbl WHERE tbl.a = t.a);