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 the difference between a web-garden and a web-farm? : Sql dba
Explain the purpose of %type and %rowtype data types?
I need a function for a train ticket reservation please answer it thanks in advance
How do you explain an index number?
How do I find duplicates in the same column?
GLOBAL TEMPORARY TABLE over Views in advantages insolving mutating error?
What are the different ways to optimize a sql query?
Why are indexes and views important to an organization?
what is a scheduled jobs or what is a scheduled tasks? : Sql dba
What is an example of translating a date into julian format?
Explain the uses of a database trigger?
what is the difference between nested subquery and correlated subquery?
Can we perform dml on view?
What are the built in functions of sql?
How do I quit sql?