Query for second maximum salary in each in each department
Answer Posted / sampath pallerla
select distinct(a.sal) from emp a where 2=(select count(distinct(b.sal)) from emp b where a.sal<=b.sal);
| Is This Answer Correct ? | 1 Yes | 7 No |
Post New Answer View All Answers
What does inner join mean?
What are the qualities of 2nf?
What are literals in sql server?
what is the difference between clustered and non clustered index in sql? : Sql dba
Table A Table B 1 1 2 1 3 1. Union & union all --> A Union B , A Union all B 2. Minus , Intersect --> A minus B , B Minus A , A Intersect B 3. Joins A join B , A Left Join B A Right Join B , A full Join B 4. %Type - Uses & Benifit 5. Truncate & Delete 6. Pragma Autonomus Transaction 7. how to Perform DDL from function or procedure 8. Can we have DML inside Function 9. Rank & Dense Rank diffrence 10. Water Mark in Oracle 11. Index , Can we have index in all column of table if no then why ?
what are the differences among rownum, rank and dense_rank? : Sql dba
How do I install microsoft sql?
What does trigger mean in psychology?
What is rename command in sql?
What is sap sql anywhere?
What is java sql connection?
how to add a new column to an existing table in mysql? : Sql dba
How do I view tables in sql developer?
how can you see all indexes defined for a table? : Sql dba
Is pl sql different from sql?