Query for second maximum salary in each in each department
Answer Posted / manju
select deptno,Max(e1.sal) from emp e1
where e1.sal NOT IN(
select Max(e2.sal) from emp e2
group by e2.deptno
)
group by e1.deptno
Is This Answer Correct ? | 13 Yes | 10 No |
Post New Answer View All Answers
How can you load microsoft excel data into oracle? : aql loader
What is the use of %rowtype?
How do I count rows in sql query?
What is database sql?
What does select top 1 do in sql?
how to fetch alternate records from a table? : Sql dba
How many parts of a pl sql block are optional?
How can we find duplicate records in a table?
What is rownum and rowid?
What is sql basics?
how many triggers are allowed in mysql table? : Sql dba
What is write ahead logging in sql server?
What is sql profiling in oracle?
What is sql and how does it work?
Explain sql data types?