>
>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.

Sir, look on my web site: users.startpower.net\rjhalljr. Click on 
MySQL on the sidebar, and choose the SQL link. One of the topics 
covers this.

Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection.     -Khushhal Khan Khatak

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to