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

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 ?    13 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we create a trigger on view?

891


Is it possible to create the following trigger: before or after update trigger for each row?

1282


what is the stuff function and how does it differ from the replace function? : Sql dba

1043


Does sql between include endpoints?

998


Determine if oracle date is on a weekend?

1036


How do I view a procedure in sql?

963


Explain dml and ddl?

986


How subquery works in sql?

1067


Who developed sql?

1037


How do you optimize a query?

994


What is pl sql script?

1026


What is linq to sql?

1132


What are the string functions in sql?

971


How to pipe multiline string to isql?

1005


what are the types of join and explain each? : Sql dba

1036