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
How much memory your 10g xe server is using?
Why do I get unexpected characters from 8-bit character sets in weblogic jdriver for oracle?
How to change system global area (sga) in oracle?
How to use subqueries in the from clause in oracle?
How many objectname will be created for a single table drop function? Why 'flashback' query giving error "ORA-38312: original name is used by an existing object" while getting the table?
How can we view last record added to a table?
HI, Please let me know the syllabus for Oracle OCA and OCP Certification
Typically, where is the conventional directory structure chosen for Oracle binaries to reside?
How to import one table back from a dump file?
What is Redo Log Buffer in Oracle?
Describe an oracle table?
Why we use bulk collect in oracle?
How to add a new column to an existing table in oracle?
Hi Masters, in Oracle Applications 11i, we hace 2 functions using the same form, i need to create 1 personalization, but that code must afect only one function.... how can i do that?
We are using Oracle apps with XML publisher.In that,we are facing some problems while giving a Footer in RTF Template.While giving a footer in RTF Template it is Visible in all the pages,but after the PDF is getiing generated,the Footer are Visible on alternate pages only (like on first page ,third page) and so on. Please provide the Solution for getting the Footer on all the pages.