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

select a.sal,a.emp_no from employee a
where 5=(select distinct(count(*) from
employee b where a.sal> b.sal)

Is This Answer Correct ?    8 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create a table index?

1152


How to delete all rows a table in oracle?

1068


How to get maxsal , minsal, ename department wise in single query

1549


What types of joins are used in writing subqueries?

985


What is rich query?

983


Explain oracle instance.

1180


How are extents allocated to a segment?

1126


What is oracle data type?

964


How do we create privileges in oracle?

1047


What is a sub query and what are the different types of subqueries?

1126


Give the different types of rollback segments.

1031


Tab A A B ------ 1 A 2 B 3 C Tab B A B ----- 4 D 5 E 6 F Generate the value into B table from A table. Only table A has the value. Write the SQL query to get B table value.

1787


How to join two tables in a single query using oracle?

997


Difference between pre-select and pre-query

1114


How to load a large xml file?

1056