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

How to read/write files from pl/sql?

1050


How to run sql statements with oracle sql developer?

1081


How to place comments in pl/sql?

1173


What are sql injection vulnerabilities?

992


What is the function that is used to transfer a pl/sql table log to a database table?

1031


How can you load multi line records? : aql loader

1089


How to pipe multiline string to isql?

1014


What is primary key sql?

1049


what is offset-fetch filter in tsql? : Transact sql

957


What is java sql driver?

1129


How do I trace sql profiler?

998


what are the advantages of mysql in comparison to oracle? : Sql dba

1014


When is the update_statistics command used?

1131


what are the types of subquery? : Sql dba

1118


What is the current version of sql?

1032