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 do you mean by stored procedures?
Does truncate require commit?
What is difference between joins and union?
Explain how you can copy a file to file content and file to pl/sql table in advance pl/sql?
how to write date and time literals? : Sql dba
How do I add a database to sql?
What is difference between sql and excel?
Which normal form is best?
Can I join the same table twice?
What is primary key sql?
Can a table contain multiple primary key’s?
what's the difference between a primary key and a unique key? : Sql dba
Explain constraints in sql?
How do I audit the sql sent to the server?
what is subquery? : Sql dba