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

State the different extensions for stored procedures?

475


What is RDBMS KERNEL?

744


What are pages and extents? : sql server architect

477


What is tier in database?

422


What is raid and what are different types of raid configurations? : sql server architect

460






What is a Relation Schema and a Relation?

503


What is DML (Data Manipulation Language)?

518


What are the primitive operations common to all record management systems?

564


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

483


What is an Entity type?

508


How is the data structure of System R different from the relational structure?

460


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

514


Name the buffer in which all the commands that are typed in are stored

438


What is Query evaluation engine?

504


What is system catalog or catalog relation? How is better known as?

498