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 / karthik

select * from (select ename,eno,dept,sal,row_number() over
(partition by dept order by sal desc)top5 from emp) where
top5 <= 5

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is blob data type in oracle?

1063


How to delete multiple rows from a table in oracle?

1026


What is bulk collect in oracle?

968


what are steps for interface? where is exchange rate defined in which table?

2086


How to get last row id?

954


What is PL/SQL ?

1950


Explain integrity constraint?

1126


Explain parameter file in oracle.

987


Can we create trigger on materialized view in oracle?

950


How to store only time; not date and time?

980


What are the different types of database objects?

1016


How do I decide when to use right joins/left joins or inner joins or how to determine which table is on which side?

983


How to end the current transaction in oracle?

982


In Oracle Clinical 4.5.0, can the VIEW_TEMPLATE_ID column in DATA_EXTRACT_VIEWS table contain NULL value?

2304


What is the usage of analyze command in oracle?

1051