adspace
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
Can we rollback truncate?
Is primary key always clustered index?
Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me
what are the advantages of sql ? : Sql dba
what is dbms? : Sql dba
what are all the common sql function? : Sql dba
Is primary key clustered index?
what is schema? : Sql dba
Can we use distinct and group by together?
how to use regular expression in pattern match conditions? : Sql dba
how to escape special characters in sql statements? : Sql dba
Is inner join faster than left join?
What is the current version of postgresql?
how to start mysql server? : Sql dba
what is bcp? When does it used? : Sql dba