Query for second maximum salary in each in each department

Answer Posted / sureshramsing

select * from(select row_number() over(partition by deptno order by sal desc) rn,a.* from emp a) where rn=1;

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create your own reports in sql developer?

544


what is a field in a database ? : Sql dba

547


What is aggregate function in sql?

539


What is data control language?

532


what is a constraint? : Sql dba

715






what are wild cards used in database for pattern matching ? : Sql dba

554


What is sql*loader and what is it used for? : aql loader

627


what are dynamic queries in t-sql? : Transact sql

565


What is the usage of when clause in trigger?

571


What is multiple partition?

541


What is data profiling in sql?

521


Define join and name different types of joins?

522


Explain character-manipulation functions?

636


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

536


What are the types of dbms?

549