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 are the operators used in select statements?
What has stored procedures in sql?
what are the different tables present in mysql? : Sql dba
What do you mean by “trigger” in sql?
Why query optimization is needed?
How to read xml file in oracle pl sql?
Explain architecture of sql server notification services?
What is the primary use of normalization?
How do you truncate?
what is auto increment? : Sql dba
how many values can the set function of mysql take? : Sql dba
What is the need of merge statement?
Can you upgrade sql express to full sql?
How to use distinct and count in sql query? Explain
What is exception? What are the types of exceptions?