How to select the record contains MAX(some_field) within GROUP(group by)
Posted
by lovespring
on Stack Overflow
See other posts from Stack Overflow
or by lovespring
Published on 2010-04-13T16:17:42Z
Indexed on
2010/04/13
16:23 UTC
Read the original article
Hit count: 270
mysql
SELECT MAX(some_field) FROM table_A GROUP BY another_field.
this only get the max value of the 'some_field', I wanna get the whole record which contains the MAX(some_field).
thanks.
© Stack Overflow or respective owner