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

What does <> sql mean?

535


Is json a nosql?

539


What does cursor do in sql?

514


what are the different type of sql's statements ? : Sql dba

520


what is collation? : Sql dba

612






How do I order columns in sql?

525


What is mutating trigger?

576


What are the different datatypes available in PL/SQL?

564


How many scalar data types are supported in pl/sql?

518


Which join is default?

519


What is the difference between having clause and where clause?

563


what is heap table? : Sql dba

605


What is the difference between cross join and natural join?

564


what is the difference between nested subquery and correlated subquery?

547


What are pl sql procedures?

510