What is the sql query to find the employee who has Nth
maximum salary?

Answers were Sorted based on User's Feedback



What is the sql query to find the employee who has Nth maximum salary?..

Answer / naresh

Select * From TableName T1 Where
(N-1) = (Select Count(Distinct(E2.ColumnName))
From TableName T2 Where T2.ColumnName > T1.ColumnName)

Is This Answer Correct ?    1 Yes 0 No

What is the sql query to find the employee who has Nth maximum salary?..

Answer / naweed ahmad

SELECT * FROM Emp E1 WHERE n-1 =
(SELECT COUNT(DISTINCT Sal) FROM Emp E2 WHERE E1.Sal <
E2.Sal)order by Sal desc

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Oracle AllOther Interview Questions

Is there any link between pr form(purchse requisition)and po form(purchase order)

0 Answers   L&T,


What is $FLEX$ and $PROFILES$?

2 Answers  


what are basic modules required to implement oracle application in any oraganisation?

0 Answers  


HOW TO SPOT AHIERARCHY?

0 Answers  


Why more redos are generated when the oracle database is in begin backup mode?

0 Answers  






Are These Dff's Flexible?

0 Answers   Oracle,


What is db_recovery_file_dest in oracle? When do you need to set this value?

0 Answers  


Is Oracle 7.3 is a single user or multi user..Is it possible to use this as a backend for web applications?

2 Answers  


How to find 8th person record in a table? Plz mail ur answers to mak2786@gmail.com Regards Arun

8 Answers  


Why we are using primary key and foreign key in oracle and difference between primary key and foreign key?

1 Answers  


Differentiate between standard remittance and bills receivable remittance : oracle accounts receivable

0 Answers  


How to clone the database using RMAN back

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)