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

Difference between global and parameter variables?

1929


Define sql delete statement.

974


How do we use distinct statement? What is its use?

999


Is pl sql and postgresql same?

1080


What is trigger in sql? Explain

964


Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?

1191


Can we write ddl statements in functions?

1075


How do you create a db file?

978


What are the datatypes available in pl/sql ?

1069


Are left and right joins the same?

1028


how many ways to get the current time? : Sql dba

973


what is primary key? : Sql dba

981


What are the disadvantages of not performing database normalization?

1130


What is data manipulation language?

1162


What is aggregate function in sql?

1010