List:General Discussion« Previous MessageNext Message »
From:zhihuali Date:January 27 2008 4:02pm
Subject:a multi-order question
View as plain text  
Hi netters,

Suppose I have a table X:
Name        Salary
Tom            1000
Jack             3000
Mike           1000
Mike           3500
Tom           4000

I want to do the following thing:
First, order by Salary;
Second, starting from the highest salary down, group by Name. So the resulting table would
Tom   4000
Tom   1000
Mike   3500
Mike   2000
Jack    3000

If I order by Salary,Name, the Name will not be grouped together.  Can anyone help me with

Thank you very much!

Zhihua Li

Windows Live Photo gallery
a multi-order questionzhihuali27 Jan
  • Re: a multi-order questionJoerg Bruehe31 Jan