Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is sharded cluster?

929


How to do paging with oracle?

951


How to check database size in Oracle?

1122


Explain the use of indexes option in imp command.

1089


What is a subquery in oracle?

1044


Describe an oracle table?

993


What is program global area (pga) in oracle?

961


Explain a synonym?

975


How to define a sub function?

1086


What is the relation of a user account and a schema in oracle?

1009


20. Using a set operator, display the client number of all clients who have never placed an order.

2148


how to join query for one source type is oracle another source type is sql server ?

2381


How to add a new column to an existing table in oracle?

1074


What are the various types of snapshots ?

975


What is literal?

960