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 to create an oracle testing table?
Explain the use of consistent option in exp command.
how the indexes are stored in the Oracle Database?
How is it different from a normal table?
What is a select query statement in oracle?
What is a server parameter file in oracle?
Give the advantages and disadvantages of clusters.
What is an oracle cursor variable?
Please explain joins in oracle?
What types of joins are used in writing subqueries?
How to use fetch statement in a loop?
What is dual table oracle?
How do we display rows from the table without duplicates?
Explain what are the different type of segments?
Does oracle partitioning improve performance?