mysql max group by returning all rows code example
Example: mysql group by max value
-- MySql: First result only returned, so Person with max age in each Group
select *
from (select * from mytable order by `Group`, age desc, Person) x
group by `Group`;