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...

how will I find the first 5 highest salaried employees in
each dept in oracle.

Answer Posted / shareef

select * from(select emp.*,
dense_rank() over(partition by deptno order by sal desc) r
from emp) where r<=5;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain implicit cursor.

963


normally database take to refresh time 2 hours. but client asked iwant to refresh with in 5 min that same database. do you have any option in BO and Oracle? explain me briefly...kavi

2146


what are the advantages of running a database in archive log mode?

2144


interview questions with answer for cts

2534


candidate key is subset of super key but not vice-verse explain

2019


What do you understand by a database object? Can you list a few of them?

971


Explain mutating triggers.

974


What are the differences between lov and list item?

992


How to convert a date to char in oracle? Give one example.

1003


How to set up autotrace for a user account?

976


What is an oracle user role?

939


What is the difference between hot backup and cold backup in oracle?

958


What is system tablespace?

1044


How to get a list of all user accounts in the database?

1035


What is the string concatenation operator in oracle?

1093