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
Is postgresql a server?
How do you identify a primary key?
What are the constraints available in sql?
How many sql commands are there?
what are the t string functions available in tsql? : Transact sql
Why use triggers in sql?
How to start oracle sql developer?
What are the indexing methods?
Is left join and outer join same?
how to include comments in sql statements? : Sql dba
What is indexing oracle sql?
What is the difference between left outer join and left join?
What is sql entity?
how can you create an empty table from an existing table? : Sql dba
Can we declare a column having number data type and its scale is larger than pricesionex: column_name number(10,100),column_name numbaer(10,-84)