Query for second maximum salary in each in each department
Answer Posted / suneelkumar
select * from emp x where 2=(select count(distinct sal) from
emp y where x.sal<=y.sal) group by deptno;
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What is the file extension for sql database?
Can we join same table in sql?
How do you optimize a stored procedure in sql?
Describe sql comments?
How do I get sql certification?
What do you understand by pl/sql records?
Does sql backup shrink transaction log?
Is not null in sql?
What is the benefit of foreign key?
How do I install microsoft sql?
How does sql store data?
What is difference between stored procedure and trigger?
Does pdo prevent sql injection?
How do I find duplicates in sql?
Can we use ddl statements in stored procedure?