i need department wise top 2 employees salary.which logic
i will use

Answer Posted / vikas kapoor

select deptno,sal from
(select deptno,sal,row_number() over(partition by deptno orderby sal) r from emp ) where r<3

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does a self join work?

528


Is a secondary key the same as a foreign key?

500


Why do we use view in sql?

542


Does sql full backup truncate logs?

541


Which one is better sql or oracle?

508






what is an extent ? : Sql dba

593


What is a full join sql?

604


What is the difference between microsoft access and sql server?

538


What are the built in functions of sql?

580


what are the different type of sql's statements ? : Sql dba

526


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

570


What does (+) mean in sql joins?

536


What is pl/sql language case sensitive?

642


what is rollback? : Sql dba

603


what are all the different types of indexes? : Sql dba

542