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

select department_id, salary from
(select department_id, salary, rank() over(partition by
department_id order by salary desc) r from employees) where r=2;



cheers;

Is This Answer Correct ?    35 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where the sql database files are stored?

958


Is postgresql a server?

997


Differentiate between syntax and runtime errors.

1120


how to drop an existing index in mysql? : Sql dba

1019


what is a database? : Sql dba

1101


Explain the difference between sql and mysql.

1003


What type of database is cloud sql?

1046


Are left and right joins the same?

1003


What is a pragma statement?

1204


Is left join and outer join same?

1006


How do I filter in sql profiler?

949


What is the syntax and use of the coalesce function?

1100


What is java sql package?

1026


What makes a good primary key?

982


What is pl sql collection?

921