how will I find the first 5 highest salaried employees in
each dept in oracle.
Answer Posted / mihir nasikkar
select *
from employee X
where salary in (select top 5 salary
from employee
where dept = X.dept
order by salary desc)
order by dept, salary desc
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
How to upsert (update or insert into a table)?
What do you understand by a database object?
how may join possible between (requisition with purchase order)
Please explain me all types of Data models. Also give me the details if each model can have other name.for example:schematic data model is also known as conceptual data model and entity relation data model.
What do you mean by a tablespace?
What are the arithmetic operations?
What is an oracle?
What query tells you how much space a tablespace named test is taking up, and how much space is remaining?
You have found corruption in a tablespace that contains static tables that are part of a database that is in NOARCHIVE log mode. How would you restore the tablespace without losing new data in the other tablespaces?
Provide an example of a shell script which logs into SQLPLUS as SYS, determines the current date, changes the date format to include minutes & seconds, issues a drop table command, displays the date again, and finally exits.
How to rename an index?
What is ASM (Automatic Storage Management) in Oracle?
Explain joins in oracle?
What is the difference between a primary key & a unique key?
How to retrieve data from an explicit cursor?