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

SELECT r.salary, r.department_id, r.RANK highest
FROM (SELECT salary, department_id,
DENSE_RANK () OVER (PARTITION BY
department_id ORDER BY salary DESC)

RANK
FROM employees) r
WHERE r.RANK <= 3
ORDER BY 2

Is This Answer Correct ?    10 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do we accept inputs from user during runtime?

993


Is it possible to pass parameters to triggers?

1032


What is gpt format?

895


how to create a table index in mysql? : Sql dba

988


what is try_catch block in procedure

1659


What does := mean in pl sql?

991


Why we use join in sql?

917


Which is faster subquery or join?

1148


define data blocks ? : Sql dba

932


What are different types of sql?

1101


how many ways we can we find the current date using mysql? : Sql dba

1039


how to create a new table by selecting rows from another table in mysql? : Sql dba

1011


how to get a list of columns in an existing table? : Sql dba

916


What is secondary key?

882


Explain the difference between drop and truncate commands in sql?

965