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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / lakshya

SELECT salary FROM employee where rownum < 6 ORDER BY
salary DESC
group by dept;

Is This Answer Correct ?    11 Yes 39 No

Post New Answer

More Oracle General Interview Questions

What is Water Mark in Oracle?

7 Answers   Oracle,


Describe varray?

0 Answers  


What is self-referential integrity constraint ?

2 Answers   SunGard,


Do you know about aggregate functions? What is row num function? Can it be used all databases?

1 Answers   Bravura Solutions, Cap Gemini,


What is the difference between substr and instr?

0 Answers  






How many types of segments in Oracle?

0 Answers   MCN Solutions,


a query to select maxmun 3 salaries of employee table

12 Answers   IBM, Polaris,


How to end the current transaction in oracle?

0 Answers  


Give the different types of rollback segments.

0 Answers  


What is oracle host variable?

0 Answers  


Difference between hot backup vs. Cold backup?

0 Answers  


what is the difference between restoring and recovering?

0 Answers   MCN Solutions,


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)