For Finding nth highest salary I am using
select salary from
(
select distinct ROW_NUMBER() over (order by salary desc) as rownum,Salary
from Employee
)a
where rownum=2
However if i have same salary like
70000
70000
60000
50000
50000
When executing the query i am getting second highest salary
70000 instead 60000
how to avoid duplicates?