Home » RDBMS Server » Server Administration » nth maximum salary
nth maximum salary [message #371406] Fri, 13 October 2000 10:36 Go to next message
vicky
Messages: 14
Registered: October 2000
Junior Member
How do i build a SQL quety to get the nth maximum salary?
Re: nth maximum salary [message #371408 is a reply to message #371406] Fri, 13 October 2000 13:29 Go to previous message
Suresh
Messages: 189
Registered: December 1998
Senior Member
select distinct(sal) from emp a where &nthsal=(select count(distinct(sal)) from emp b where a.sal<=b.sal)

Suresh
Previous Topic: Call Stored procedure with specific time
Next Topic: ORA-03114 with dbassist
Goto Forum:
  


Current Time: Fri Apr 19 11:50:53 CDT 2024