This discussion is archived
1 Reply Latest reply: Apr 1, 2013 2:10 AM by 934969 RSS

Query to display the nth highest paid employee

934969 Newbie
Currently Being Moderated
Hi All,

Can anybody explain this query?

SELECT empno,ename,sal FROM emp X WHERE &N = (SELECT COUNT(DISTINCT sal) FROM emp WHERE sal >= x.sal);

Thanks in Advance.....


  • Correct Answers - 10 points
  • Helpful Answers - 5 points