How to find only %th Highest Sal

Answer Posted / abhishekjaiswal

SELECT A.FIRST_NAME,
       A.SALARY
   FROM EMPLOYEES A
   WHERE 3 = ( SELECT COUNT(*) -- Replace 3 with any value of (N - 1)
               FROM EMPLOYEES B
               WHERE B.SALARY > A.SALARY)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explian rowid, rownum?

751


How do I find duplicates in sql?

689


What is substitution variable?

788


What are aggregate functions in sql?

840


What is scalar function in sql?

706






what is the difference between rownum pseudo column and row_number() function? : Sql dba

810


What are operators available in sql?

781


What is data definition language?

803


Which sql most popular?

728


What kind of join is join?

704


What is the use of triggers?

738


How many clustered indexes can you have?

726


What is right join sql?

711


Is sql injection illegal?

771


What is cold data?

678