Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Selecting 2nd Largest Value
I had an extension to this question. What if I have to group and then
pick the second highest value.
In the example below: I want to find the second highest salary earner in each department
Example:
ID Department Salary
1 101 450 2 101 500 3 101 550 4 201 500 5 201 450
The query should return
ID Department Salary
2 101 500 5 201 450Received on Mon Dec 06 2004 - 18:44:42 CST