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

i need department wise top 2 employees salary.which logic
i will use

Answer Posted / naresh anumolu

SELECT * FROM(SELECT *,DENSE_RANK() OVER(PARTITION BY DEPTNO ORDER BY SAL DESC) AS RANK FROM EMP)A WHERE RANK<3

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does sql developer connect to oracle database?

1007


what is a field in a database ? : Sql dba

1067


how can we optimize or increase the speed of a mysql select query? : Sql dba

952


What are the packages in pl sql?

1017


What is sql analyzer?

1026


what are the different tables present in mysql? : Sql dba

988


Does sql*plus also have a pl/sql engine?

1083


Explain unique key in sql.

1017


can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible? : Sql dba

1006


Explain what is a database?

1089


How to disable a trigger name update_salary?

1269


Can a table contain multiple primary key’s?

1104


What is column?

999


How to add, remove, modify users using sql?

1039


How to connect a sql*plus session to an oracle server?

1134