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 to get the second max val for every group in a table

Answer Posted / ram posam

select * from (select deptno,sal,rank() over(partition by
deptno order by sal desc) k
from emp
group by deptno,sal)
where k=&n;

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 an Oracle Instance?

1105


Define the SGA and: How you would configure SGA for a mid-sized OLTP environment? What is involved in tuning the SGA?

2249


Difference between cartesian join and cross join?

1010


Give the different types of rollback segments.

1016


How to recover a dropped table in oracle?

1021


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

2137


What are the types of trigger in oracle?

965


How to put more than 1000 values into an oracle in clause?

1012


you are a universe designer and report developer in BO, what type of information you gather from client?Briefly explain plz

1925


How to work with data objects interactively?

959


How to convert character types to numeric types?

1096


What are ddl statements in oracle?

1047


How to get a list of all user accounts in the database?

1074


How do I find my oracle client driver version?

1020


What is bulk collect in oracle?

982