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

SELECT *
FROM
    (
     SELECT Ename, Deptno, Sal,
     DENSE_RANK(PARTITION BY Deptno
                ORDER BY Sal DESC
                )TopRank
     FROM Emp
     )
WHERE TopRank = 2

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the difference between undefined value and null value? : Sql dba

1110


What is sqlca in powerbuilder?

1028


Can we use join in subquery?

1103


How do you modify a trigger?

932


What is rtm stands for?

1111


What are the two parts of design view?

1023


How many joins can you have in sql?

947


What is $$ in sql?

1002


Which tcp/ip port does sql server run on? How can it be changed? : Sql dba

1009


What type of database is cloud sql?

1110


What is pl sql quora?

1177


What is a .db file?

992


Is big data nosql?

957


how to convert character strings to dates? : Sql dba

1071


What is the difference between alter trigger and drop trigger statements?

1117