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

Are the resulting relations of PRODUCT and JOIN operation the same?

518


What is Relationship set?

472


What is database architecture?

418


What are the the Advantages of DBMS?

499


Explain about the implementation of stored procedures?

522






What is DDL Interpreter?

536


What is 3NF?

542


What is 5NF?

497


Can we use commit inside the trigger? If not then how can we save the transaction made by the trigger?

519


What is "transparent DBMS"?

521


What is VDL (View Definition Language)?

644


What is Relationship type?

546


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

487


Explain the truncate command? : sql server architect

443


What is difference between 2 tier and 3 tier architecture?

441