i need department wise top 2 employees salary.which logic
i will use
Answer Posted / shyam
select * from
(select ename,job,sal,deptno,
dense_rank()
over(partition by deptno order by sal desc) densrank
from emp)
where densrank<=2;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is vector point function?
What is clause?
what is the difference between rownum pseudo column and row_number() function? : Sql dba
What is auto increment in sql?
How does index help in query performance?
What is dbo in sql?
What is the difference between local and global temporary table?
Write a program that shows the usage of while loop to calculate the average of user entered numbers and entry of more numbers are stopped by entering number 0?
What are inner and outer joins examples of both?
How delete all data from all tables in sql?
Is drop table faster than truncate?
What are the benefits of triggers?
Are stored procedures faster than dynamic sql?
Why we use joins in sql?
how to rename an existing table in mysql? : Sql dba