[snip]
I want to retrieve members of each family that have the two highest 
scoring values for a column. i.e the max and second max.
Is there a function similar to max() or greatest() that will return the 
top 2 values when grouping by family ID?
[/snip]

Try this query

select foo, MAX(bar)
from table
order by bar DESC
limit 2;

HTH!

Jay






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