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
Explain spool.
What are the different parts of a package?
What are the two virtual tables available at the time of database trigger execution?
what are the 'mysql' command line options? : Sql dba
How to run pl/sql statements in sql*plus?
explain what is mysql? : Sql dba
Can a varchar be a primary key?
Can you select everything, but 1 or 2 fields, without writer's cramp?
What is blind sql injection?
What is microsoft t sql?
Which is better join or subquery?
How can we connect an Android App to an Oracle database and use the PL/SQL procedural code?
Is it important to partition hard disk?
What does varchar include?
what tools available for managing mysql server? : Sql dba