> Hello,
> 
> I have a table with the following structure and values:
> 
> CustomerID    Score
> 
>       4                  8
>       2                  6
>       3                  2
>       3                  8
>       4                  7
>       2                  7
> 
> I would like to query for the top ten customer averages. Is 
> this possible in
> a single query?

Try:

select CustomerID, avg(score) as A from table_name group by CustomerID order by A desc 
limit 10

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