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 synchronized subquery?
what are the type of locks ? : Sql dba
How to select unique records from a table?
Can we join tables without foreign key?
What is sql query optimization?
how mysql optimizes distinct? : Sql dba
What are string functions in sql?
How do you create a db file?
How do I create an index in word?
What is indexing oracle sql?
what is the difference between clustered and non clustered index in sql? : Sql dba
Does mysql support pl sql?
What are the different datatypes available in PL/SQL?
what is the difference between delete and truncate statement in sql? : Sql dba
what is an index? : Sql dba