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

SELECT *
FROM
    (
     SELECT e1.*,
     DENSE_RANK() OVER(PARTITION BY Deptno
                ORDER BY Sal DESC
                )TopRank
     FROM Emp e1
     )
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

In a distributed database system, can we execute two queries simultaneously?

1098


Does view store data in sql?

970


explain the delete statements in sql

1066


Why do we go for stored procedures?

1064


What is data type in database?

1001


What does cursor do in sql?

1031


what are the differences between char and varchar? : Sql dba

1078


What is the use of & in pl sql?

1049


How much does sqlite cost?

1047


What are the parameter modes supported by pl/sql?

1115


define sql delete statement ? : Sql dba

1026


Why we use stored procedure instead of query?

1003


Can instead of triggers be used to fire once for each statement on a view?

963


How do I turn a list into a table?

965


what is a database transaction? : Sql dba

1190