Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is synchronized subquery?

1091


what are the type of locks ? : Sql dba

898


How to select unique records from a table?

999


Can we join tables without foreign key?

908


What is sql query optimization?

1021


how mysql optimizes distinct? : Sql dba

1000


What are string functions in sql?

1170


How do you create a db file?

957


How do I create an index in word?

966


What is indexing oracle sql?

1025


what is the difference between clustered and non clustered index in sql? : Sql dba

1048


Does mysql support pl sql?

1098


What are the different datatypes available in PL/SQL?

1027


what is the difference between delete and truncate statement in sql? : Sql dba

1127


what is an index? : Sql dba

930