3 messages in com.mysql.lists.javaOrder By
FromSent OnAttachments
Sudhir16 Aug 2001 19:38 
Artigas, Ricardo Y.16 Aug 2001 20:41 
Artigas, Ricardo Y.16 Aug 2001 22:26 
Subject:Order By
From:Sudhir (sud@unidux.com.sg)
Date:08/16/2001 07:38:05 PM
List:com.mysql.lists.java

Hello everybody,

In my program, I have got something like this,

sql="select distinct(client_group),sum(jan_actual),sum(tactual),avg(weightage) from msalesdata where year='"+year+"' group by client_group order by jan_actual desc";

Using this query, the sorting is not in proper order. What my intension is order by 2nd column(sum(jan_actual)) of the result set.

Can anybody suggest me the proper way to query.

Thanks and Best Regards,