How do I do a single query to group a table by one column & then get the row of say
the highest of each group ?
Data is like so :
Album, City, Plays, Date
Britney, NYC, 103, 1-10
Britney, SF, 101, 1-10
Eminem, NYC, 100, 1-11
Eminem, SF, 102, 1-11
So I want to GROUP BY Album, then get the row with the highest # of Plays to get this
result :
Album, City, Plays, Date
Britney, NYC, 103, 1-10
Eminem, SF, 102, 1-11
When I use a GROUP BY I keep getting arbitrary album records instead of the row I want
( highest plays). I've tried various combos of GROUP BY & HAVING but am stumped.
thanks,
- Sam.
---------------------------------
Do You Yahoo!?
Yahoo! Mail Personal Address - Get email at your own domain with Yahoo! Mail.