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

What are the operators in sql?

991


Explain the select statement in sql?

1058


which types of join is used in sql widely? : Sql dba

942


How to fetch values from testtable1 that are not in testtable2 without using not keyword?

1178


What is range partitioning?

918


Enlist the characteristics of pl/sql?

1764


Explain two easy sql optimizations.

979


Write a query to display the current date in sql?

985


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

1043


What is pragma in sql?

1039


Can we have two clustered index on a table?

986


What is cursor in pl sql with examples?

976


What is the use of function "module procedure" in pl/sql?

1158


Define union, minus, union all, intersect ?

960


What is a relationship and what are they?

1080