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
Which normal form is best?
How do you update a sql procedure?
What is the cause of mutating table error and how can we solve it?
What is triggering circuit?
What are the sql aggregate functions?
How do I order by ascending in sql?
Are null values same as that of zero or a blank space?
What is user in sql?
Is sql considered coding?
What is varchar example?
Does sql use python?
What is a stored procedure in sql with example?
What is the difference between partition and index?
How do I remove duplicates in two columns?
What is AUTH_ID and AUTH_USER in pl/sql ?