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
What is the maximum number of triggers that can be applied to a single table?
What is the best way to do multi-row insert in oracle?
normally database take to refresh time 2 hours. but client asked iwant to refresh with in 5 min that same database. do you have any option in BO and Oracle? explain me briefly...kavi
How do you increase the OS limitation for open files (LINUX and/or Solaris)?
What is rowid and rownum in oracle?
How to start your 10g xe server from command line?
What is the difference between alert log file and tarce file ?
What is the meaning of recursive hints in oracle?
How to create a single index for multiple columns?
How can we force the database to use the user specified rollback segment?
What is tns entry?
How to import one table back from a dump file?
Name the three major set of files on disk that compose a database in Oracle?
How to sort the query output in oracle?
How to use like conditions in oracle?