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 / kumar mrityunjay singh
SELECT *
FROM (SELECT EMPLOYEE_ID,MANAGER_ID,SALARY,DENSE_RANK() OVER(ORDER BY SALARY DESC)RN FROM EMPLOYEES WHERE MANAGER_ID='&ENTER_MANAGER_ID')WHERE RN < '&VALUE_UPTO'
/
| Is This Answer Correct ? | 8 Yes | 4 No |
Post New Answer View All Answers
How do I learn what codesets are available in oracle?
Is there a function to split a string in plsql?
you are a universe designer and report developer in BO, what type of information you gather from client?Briefly explain plz
What happens if you set the sga too low in oracle?
What privilege is needed for a user to insert rows to tables in another schema?
src name sex a,male b,female c,male d,female Required output : male female a,b c,d tried pivot but was not successfull select * from src pivot (max(name) for sex in ('MALE','FEMALE'));
I have a parent program and a child program. I want to write a statement in Exception Block of the parent program so that when the statement in the exception block is executed, the control goes to the next statement in the parent block bypassing the child block.How do i do that?
What do you mean by group by clause?
What is merge statement used for?
List the types of joins used in writing subqueries?
What is meant by an index?
How to convert dates to characters in oracle?
Can we connect to ORACLE db using Windows Authentication?
How to invoke the data pump export utility?
How do we represent comments in oracle?