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 / nagaraju nampally

select * from (select ename,sal,deptno,dense_rank()
over(partition by deptno order by sal)rnk from emp)x where
x.rnk<5

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is object data modeling?

1017


What is an oracle user account?

1043


How to insert a new row into a table in oracle?

1218


How do I spool to a csv formatted file using sqlplus?

1090


What is the relationship among database, tablespace and data file?

1039


Why oracle is used?

1108


What is a sub query? Describe its types?

1074


Where do you use decode and case statements?

1045


What happens if you use a wrong connect identifier?

1141


What is java oracle used for?

1076


How to assign values to data fields in record variables?

1080


What happens internally when the user types userID/password@string in SQL PLUS Thanks-Bhaskar

4686


What to do if dba lost the system password?

1248


How to login to the server without an instance?

1217


How to loop through data rows in the implicit cursor?

1120