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

What is sql basics?

1083


What is difference between mysql and postgresql?

1233


How to run sql statements through the web interface?

1093


Define select, insert, create, delete, update, drop keywords

1094


How many types of privileges are available in sql?

1403


What is microsoft t sql?

985


Where is sql database stored?

1039


Is pl sql a programming language?

1044


What are the parameter modes supported by pl/sql?

1154


What does the base_object_type column shows in the user.triggers data dictionary view?

1097


What does the argument [or replace] do?

1128


What is the sql query to display the current date?

1093


Why we use stored procedure instead of query?

1047


What are different types of indexes?

1057


Does truncate free space?

1064