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

When to use inner join and left join?

939


What is sequence in sql?

988


What is the use of sqlerrd 3?

930


Difference between global and parameter variables?

1951


Can instead of triggers be used to fire once for each statement on a view?

952


Is left join faster than join?

1039


what are the advantages a stored procedure? : Sql dba

965


What are the types of triggers in sql?

1068


What are the different ways to optimize a sql query?

932


What is the purpose of a secondary key?

946


What is data abstraction in sql?

1013


What is trigger and how to use it in sql?

1011


what is 'mysqlimport'? : Sql dba

1022


What is primary key sql?

1017


How does a covering index work?

948