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 are the types of operators available in sql?

1011


Can we join tables without foreign key?

909


How can you know that statistics should be updated?

1026


Why procedure is used in sql?

977


What are all the common sql functions?

971


what is the command used to fetch first 5 characters of the string? : Sql dba

1587


how many groups of data types? : Sql dba

974


What is the difference between drop and truncate commands?

999


What is pl sql collection?

921


How to process query result in pl/sql?

1062


How do you delete a table?

1001


How do you explain an index number?

1024


What is the difference between rollback and rollback to statements?

1015


Can primary key be changed?

871


Explain what is rdbms?

993