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

How to select all columns of all rows from a table in oracle?

993


What is an oracle?

958


Explain the use of show option in imp command.

1049


What is clustered table in Oracle?

1108


what is Single Byte Overhead...?

2500


what is the scripts in data base?

2080


What is an index associated with a constraint?

975


Whether any commands are used for months calculation? If so, what are they?

1042


How do we get field detail of a table?

1022


What are the attributes that are found in a cursor?

1013


How to use regular expression in pattern match conditions in oracle?

977


How do I connect to oracle?

977


Explain an index segment?

1043


Explain the use of owner option in exp command.

994


Explain the use of Merge statement in oracle 11g

978