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

select top 3 sal from each dept?

Answer Posted / shailesh j

SELECT * FROM (
SELECT DEPARTMENT_ID,SALARY,DENSE_RANK() OVER(PARTITION BY
DEPARTMENT_ID ORDER BY SALARY DESC) AS RK FROM EMPLOYEES)
WHERE RK<4;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does truncate need commit?

895


Can we use distinct and group by together?

994


Which command is used to call a stored procedure?

954


Can we create table inside stored procedure?

907


How do you add a column to a table?

996


what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba

1066


What is rtm stands for?

1024


how to convert numeric values to character strings? : Sql dba

1037


What is primary key secondary key alternate key candidate key?

982


What are the different types of tables in sql?

931


Which join is like inner join?

978


what is meant by urlencode and urldocode? : Sql dba

1092


what happens if null values are involved in expressions? : Sql dba

1001


Why do we use subquery?

944


What are the three pl sql block types?

949