how to find the fifth highest salary?

Answer Posted / saraswathi muthuraman

SQL> select * from emp_test order by sal desc;

1003 20010 11
1001 10000 11
1001 10000 11
1002 100 11
1004 99 11
1005 50 11
1006 25 11

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

1004 11 99 5

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between layer and tier?

479


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

476


What is 1 NF (Normal Form)?

499


What do data architects do?

437


What is Data Independence?

537






What is extension and intension?

535


What is one tier architecture?

448


What is 4NF?

516


What is a two tier wage system?

456


What do you know about system database? : sql server architect

442


What is database architecture? : sql server architect

477


What is difference between two tier and three tier?

423


Does storing of data in stored procedures increase the access time? Explain?

812


What is app tier?

479


What is msdb database? : sql server architect

567