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

select * from emp e1 where 2 =(select count(distinct(sal)) from emp e2 where e1.dno=e2.dno and e1.sal<=e2.sal);

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I find duplicates in a single column in sql?

971


What mean sql?

967


What is the difference between function and procedure in pl/sql?

1036


What is database white box testing and black box testing?

1068


List different type of expressions with the example.

909


What are its different types of dbms?

978


What is the primary use of normalization?

963


What is a join query?

916


What is out parameter used for eventhough return statement can also be used in pl/sql?

1043


Can we join 3 tables in sql?

979


What are hotfixes and patches?

906


What is range partitioning?

918


What does stand for in sql?

939


How do you change a value in sql?

979


What is bind variable in pl sql?

999