Did you ever get an answer?
I played with some queries and came up with this:
SELECT ID, NAME, RATING FROM SINGLEMALTS ORDER BY RATING DESC LIMIT 0,1;
If you want more than one record, you can change the 1 at the end to how
many you want.  If you want to list them all in that order, you can take
off the LIMIT 0,1 part.  Hope this helps
-Angela

Richard Reina wrote:
> 
> I've tried the manual (and the Oreily MySQL book) and played around with
> MAX() and GREATEST() but could not figure it out.
> 
> |ID     |NAME           |RATING |
> |213    |McCallen 12    |   9   |
> |214    |Glenmorangie   |   8   |
> |225    |Glenlevit      |   7   |
> 
> How do I select the one with highest rating without knowing what the
> highest rating is.
> 
> SELECT ID, NAME, RATING
> FROM SINGLEMALTS
> WHERE RATING ????
> 
> ---------------------------------------------------------------------
> 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

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