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 / mihir nasikkar

select *
from employee X
where salary in (select top 5 salary
from employee
where dept = X.dept
order by salary desc)
order by dept, salary desc

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Assuming today is Monday, how would you use the DBMS_JOB package to schedule the execution of a given procedure owned by SCOTT to start Wednesday at 9AM and to run subsequently every other day at 2AM.

1907


What are the parameters that we can pass through a stored procedure?

1000


How can we create the complete backup of data in the oracle.

2094


what is the difference between restoring and recovering?

965


What is enter substitution variable in oracle?

985


How to convert numbers to characters in oracle?

971


what is dynamic SGA and static SGA

4330


What do you understand by database schema and what does it hold?

1180


How do I find my oracle client driver version?

973


What is an oracle transaction?

1055


How to generate query output in html format?

1036


what are archived logs?

2144


In XIR2 if we lost the administration password .How can we regain the password?thanks in advance.

1870


What are oracle functions?

976


Illustrate how to determine the amount of physical CPUs a Unix Box possesses (LINUX and/or Solaris).

2248