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

Select Department,Max(Salary)
From (Select E1.Department,E1.Salary
From Employee E1,(Select Department,Max(Salary) as Salary
From Employee group by Department) E2
Where E1.Department = E2.Department
And E1.Salary<E2.Salary) E
Group by Department

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

State some properties of relational databases?

1048


What are the advantages of sql?

1051


what is online transaction processing (oltp)? : Sql dba

992


What is scope of pl sql developer in future?

1013


What is a native sql query?

1059


Can you rollback after commit?

975


Can we use pl sql in mysql?

1008


what is innodb? : Sql dba

1097


Is sql a scripting language?

985


What does where 1 1 mean in sql?

1033


Can you upgrade sql express to full sql?

1056


Which query operators in sql is used for pattern matching?

955


How can you fetch common records from two tables?

1055


Which join is default?

948


what are all the common sql function? : Sql dba

1056