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

What is sql performance tuning?

921


Can we call stored procedure in function?

960


What is the use of primary key?

1008


What is scalar function?

1054


Name some usages of database trigger?

1021


What is varchar used for?

1082


What is the difference between jpql and sql?

1096


What is record in pl sql?

1084


what are the 'mysql' command line arguments? : Sql dba

1139


What operators deal with null?

1107


Explain spool.

1184


How do you define a foreign key?

1005


Explain ttitle and btitle.

1120


What are the different types of sql commands?

1128


How many types of cursors are available in pl/sql?

1109