Query for second maximum salary in each in each department
Answer Posted / akula
select * from emp e1 where 2 =(select count(distinct(sal)) from emp e2 where e1.dno=e2.dno and e1.sal<=e2.sal);
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How to raise user-defined exception with custom sqlerrm ?
Which is better trigger or stored procedure?
What is serial sql?
Why stored procedure is better than query?
How to rename a table?
How much does sql certification cost?
what is union? : Sql dba
Is there a way to automate sql execution from the command-line, batch job or shell script?
What are the basic sql commands?
What is the difference between cross join and natural join?
What is the difference between the implicit and explicit cursors?
What does <> sql mean?
Describe different types of general function used in sql?
Is sql harder than python?
What are the different types of sql commands?