On Mon, 19 Mar 2001, Curtis Maurand wrote:

> Hi,
>   Just a quick quesiton,  I have a table that contains difined as 
> 
> create table picks(
>    handle char(30) primary key,
>    <...>
>   total int unsigned);
> 
> there is a user table that has a list of handles and other user info.  handle is the 
>primary key.
> 
> If I issue the command "select handle, sum(total) group by handle;" I get the 
>information that I'm looking for, however I'd like to sort it by the sum that I get.  
>Is there a way of accomplishing this?  

select handle, sum(total) as myorder from tb_foo group by handle order by
myorder asc 

> 
> 
> Curtis
> 


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