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


Please Help Members By Posting Answers For Below Questions

what is schema? : Sql dba

562


how to convert dates to character strings? : Sql dba

539


How many rows can sqlite handle?

587


What is meant by user defined function?

581


what are the advantages of using stored procedures? : Sql dba

620






Why is sql better than hql?

508


What is dynamic sql in pl sql?

495


what is sp_pkeys? : Transact sql

699


What is the primary key?

538


What is pl sql in oracle?

585


what is the functionality of the function htmlentities? : Sql dba

523


Define sql delete statement.

566


What are the two different parts of the pl/sql packages?

566


What is partition in sql query?

519


How do I run sql profiler?

588