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

Enlist the advantages of sql.

1001


what is difference between delete and truncate commands? : Sql dba

1133


What is the reports view in oracle sql developer?

994


how to load data files into tables with 'mysqlimport'? : Sql dba

1094


What is before trigger?

1004


what are all the different types of indexes? : Sql dba

1048


How to disable a trigger name update_salary?

1266


What packages are available to pl/sql developers?

1059


What is coalesce sql?

1001


Which is better join or subquery?

1137


List different type of expressions with the example.

935


Is subquery faster than join?

1014


What is the current version of postgresql?

1067


Are stored procedures faster than dynamic sql?

1040


What is difference between stored procedures and application procedures?

1013