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 / jairam

select deptno,Max(e1.sal) from emp e1
where e1.sal NOT IN(select Max(e2.sal) from emp e2
group by e2.deptno)group by e1.deptno

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is a table valued function object?

1076


What is #table in sql?

1180


what are null values? : Sql dba

1012


What is parallel hint?

1413


What is replication id?

987


Is primary key always clustered index?

1062


How delete a row in sql?

1041


How is a PL/SQL code compiled?

1283


What is record data type?

979


What is primary and foreign key?

1122


Can we insert in sql function?

1142


Why does sql need a server?

1083


What are sql triggers used for?

1035


what is self-join? : Sql dba

1239


What are the 3 types of behavioral triggers?

1311