Query to find the Nth highest salary..
800675Sep 29 2010 — edited Sep 29 2010Hi Guys,
I am unable to understand this query which one i got from one website.It is used to find the Nth highest salary of the employee...Can anyone please explain me each and every part of it..
The quey is :
select distinct (a.salary)
from emp a
where 1 = (select count(distinct(salary))
from emp b
where a.salary<=b.salary)
The bold part return what value..is my main question on this query..
Plz help