how to find the fifth highest salary?

Answer Posted / saraswathi muthuraman

Try this :

SQL> select * from (select emp_no,dep_no,sal,rank() over
(order by sal desc) as rank_list from emp_test group by
emp_no,dep_no,sal) where rank_list =5;

1005 11 50 5

This seems to be a correct answer if few employ having same sal

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you communicate with an RDBMS?

502


What is durability in DBMS?

545


What is a query?

516


What is RDBMS KERNEL?

735


What is the job of the information stored in data-dictionary?

481






What is join dependency and inclusion dependency?

463


What is DML (Data Manipulation Language)?

513


What is Data Storage - Definition Language?

467


What is the difference between cube operator and roll up operator? : sql server architect

475


State the different extensions for stored procedures?

466


What is a Phantom Deadlock?

513


What is n tier architecture with example?

424


What is difference between two tier and three tier?

415


What is Data Model?

553


What is indexing and what are the different kinds of indexing?

471