Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Selecting 2nd Largest Value

Re: Selecting 2nd Largest Value

From: <ajitsd_at_gmail.com>
Date: 6 Dec 2004 16:44:42 -0800
Message-ID: <1102380282.095561.271870@f14g2000cwb.googlegroups.com>


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              450
Received on Mon Dec 06 2004 - 18:44:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US