You have one employee table having 3 entries emp_id, Mgr_id
and salary. Mgr_id is also referencing emp_id. so now find
out the emp_id which are having the second highest salary,
under a particular manager.
Answer Posted / rajesh
select * from (select
emp_id,mgr_id,salary,dense_rank()over(partition by mgr_id order by salary desc nulls last) rn from emp) where rn=2;
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
In Oracle Applications We are Using Sub Ledger Accounting. When we Transfer the Data all modules (AP,AR,CE,FA) to SLA We done Some customizations? What are They??
What are the various types of snapshots ?
What is user managed backup in Oracle?
Whether any commands are used for months calculation? If so, what are they?
What is oracle analytical function?
What is oracle used for?
How to create a new oracle data file?
What is clustered table in Oracle?
How to pass parameters to procedures in oracle?
How to assign a table row to a record variable?
Why does for update in oracle 8 cause an ora-01002 error?
State and explain the different types of data models?
What is a table index in oracle?
What is Virtual Private Database in Oracle?
How to run create database statement again?