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
Explain database link?
What is the data pump export utility?
Please explain joins in oracle?
Explain what are the different type of segments?
What is tns service name?
Why packages are used in oracle?
What is Java Pool in Oracle?
What privilege is needed for a user to create indexes in oracle?
You have 4 instances running on the same UNIX box. How can you determine which shared memory and semaphores are associated with which instance?
What is not equal to in oracle?
What are privileges and grants?
what is meant by magic query
Explain oracle’s system global area (sga).
What is an external table?
What is a nested table and how is it different from a normal table?