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
Can we create a trigger on view?
Is it possible to create the following trigger: before or after update trigger for each row?
what is the stuff function and how does it differ from the replace function? : Sql dba
Does sql between include endpoints?
Determine if oracle date is on a weekend?
How do I view a procedure in sql?
Explain dml and ddl?
How subquery works in sql?
Who developed sql?
How do you optimize a query?
What is pl sql script?
What is linq to sql?
What are the string functions in sql?
How to pipe multiline string to isql?
what are the types of join and explain each? : Sql dba