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

How to define a data field as not null?

0 Answers  


How to define a data source name (dsn) in odbc manager?

0 Answers  


Is there a function to split a string in plsql?

0 Answers  


What is difference between SUBSTR and INSTR?

1 Answers  


how to hide the stored procedure inside a package

1 Answers  






Difference between pre-select and pre-query

0 Answers  


what is difference between table and view? where to use views? thanks in advance!

1 Answers  


Why do we need oracle client?

0 Answers  


How to rollback the current transaction in oracle?

0 Answers  


What are the types of trigger in oracle?

0 Answers  


what is the use of composite key constraint?

2 Answers  


What is DTS and purpose of DTS ?

1 Answers   TCS,


Categories
  • Oracle General Interview Questions Oracle General (1808)
  • 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)