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...

how can find the second max sal for every group(i.e i want
group the data based on key and find the second max sal for
every group

Answer Posted / nathan

SELECT *
FROM (SELECT deptno, sal,
DENSE_RANK () OVER (PARTITION BY deptno ORDER
BY sal DESC)

ranks
FROM emp)
WHERE ranks = 2;

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the use of file option in exp command.

1142


What is Library Cache in Oracle?

1150


Other than making use of the statspack utility, what would you check when you are monitoring or running a health check on an Oracle 8i or 9i database?

1992


What is an oracle recycle bin?

1016


How will you identify oracle database software release?

1021


Explain about integrity constraint?

1136


Explain the difference between replace() and translate() functions in oracle?

1049


How do I find the database name in oracle?

1045


11. Display the client number and name and the client number and name of the person who referred that client.

2348


How to pass a cursor variable to a procedure?

1118


What are the differences between lov and list item?

1078


Which is better Oracle or MS SQL? Why?

6407


How do I decide when to use right joins/left joins or inner joins or how to determine which table is on which side?

1033


Can you create a synonym without having a table?

1047


Explain the use of owner option in exp command.

1059