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 sql used for?
What is the maximum size of sqlite database?
What are character functions in sql?
How do I tune a sql query?
How to start oracle sql developer?
I need a function for a train ticket reservation please answer it thanks in advance
How do I run a pl sql procedure in sql developer?
How to avoid duplicate records in a query?
What is composite primary key in sql?
What is an exception in PL/SQL? What are the two types of exceptions?
what are the system privileges that are required by a schema owner (user) to create a trigger on a table?
What problem one might face while writing log information to a data-base table in pl/sql?
What is an implicit commit?
how can we encrypt and decrypt a data present in a mysql table using mysql? : Sql dba
Is left join inner or outer by default?