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
What is sql performance tuning?
Can we call stored procedure in function?
What is the use of primary key?
What is scalar function?
Name some usages of database trigger?
What is varchar used for?
What is the difference between jpql and sql?
What is record in pl sql?
what are the 'mysql' command line arguments? : Sql dba
What operators deal with null?
Explain spool.
How do you define a foreign key?
Explain ttitle and btitle.
What are the different types of sql commands?
How many types of cursors are available in pl/sql?