how will I find the first 5 highest salaried employees in
each dept in oracle.

Answer Posted / manoj

SELECT employee_id, employee_name, salary FROM employees
where rownum < 6 ORDER BY
salary DESC
group by department_id;

Is This Answer Correct ?    4 Yes 29 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Whether any commands are used for months calculation? If so, what are they?

606


Why do you create or replace procedures rather that drop and recreate.

556


What is a read only transaction in oracle?

604


What is Trigger in Oracle?

584


How to assign query results to variables?

600






What is bind variable in oracle 11g?

602


Why do I get java.lang.abstractmethoderror when trying to load a blob in the db?

569


How will you write a query to get a 5th rank student from a table student_report?

1395


What the is the diff between local index and global index. give some example.

1153


What is the quickest way to export a table to a flat file?

583


What is ADDM Advisor in Oracle?

676


Can a formula column be obtained through a select statement ?

1855


What is MTTR advisor in Oracle?

621


What are internal user account in oracle?

578


How to connect the oracle server as sysdba?

640