I am referring to following query to find Nth highest salary of a employee.
select sal from emp t where &n = (select count(sal) from (select distinct sal
select sal from ( select sal, dense_rank() over (order by sal desc) as rnk ) t where rnk = 5;
Replace where rnk = 5 with whatever "nth" you want.
where rnk = 5