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 local and global variables and their differences? : Sql dba

530


Explain how to use transactions efficiently : transact sql

524


What is minus?

541


What is graph sql?

523


How does cross join work?

498






how can we encrypt and decrypt a data present in a mysql table using mysql? : Sql dba

639


When you have to use a default "rollback to" savepoint of plvlog?

715


What is normalization? How many normalization forms are there?

548


What is your daily office routine?

1807


Mention what are different methods to trace the pl/sql code?

555


What are sql constraints?

561


What are the three forms of normalization?

520


explain about mysql and its features. : Sql dba

543


What are the different type of joins in sql?

540


Mention what is the plv (pl/vision) package offers?

635