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 get a list of all background sessions in the database?

1041


Why should I use oracle database?

1050


What do you mean by merge in oracle and how can we merge two tables?

1095


Which is better Oracle or MS SQL? Why?

6487


How different is ms access and oracle?

1092


What is a synonym? What are its various types?

1175


How to see free space of each tablespace?

1083


Is oracle a programming language?

1040


How to check your oracle database 10g xe installation?

1053


What is a snapshot in oracle database?

1073


What is the usage of synonyms?

1220


How to start a new transaction in oracle?

1137


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

2391


What is a system tablespace and when it is created?

1018


Database is hung. Old and new user connections alike hang on impact. What do you do? Your SYS SQLPLUS session IS able to connect.

2208