Query for second maximum salary in each in each department
Answer Posted / jairam
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 ? | 0 Yes | 3 No |
Post New Answer View All Answers
Enlist the advantages of sql.
what is difference between delete and truncate commands? : Sql dba
What is the reports view in oracle sql developer?
how to load data files into tables with 'mysqlimport'? : Sql dba
What is before trigger?
what are all the different types of indexes? : Sql dba
How to disable a trigger name update_salary?
What packages are available to pl/sql developers?
What is coalesce sql?
Which is better join or subquery?
List different type of expressions with the example.
Is subquery faster than join?
What is the current version of postgresql?
Are stored procedures faster than dynamic sql?
What is difference between stored procedures and application procedures?