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
What is sharded cluster?
How to do paging with oracle?
How to check database size in Oracle?
Explain the use of indexes option in imp command.
What is a subquery in oracle?
Describe an oracle table?
What is program global area (pga) in oracle?
Explain a synonym?
How to define a sub function?
What is the relation of a user account and a schema in oracle?
20. Using a set operator, display the client number of all clients who have never placed an order.
how to join query for one source type is oracle another source type is sql server ?
How to add a new column to an existing table in oracle?
What are the various types of snapshots ?
What is literal?