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

How do I know if oracle is installed on windows?

983


What is procedure overloading in oracle?

1112


How do we display rows from the table without duplicates?

1014


What are temporal data types in oracle?

1164


What are the common oracle dba tasks?

1199


Can we write insert statement in function in oracle?

1153


Which environment variables are absolutely critical in order to run the OUI?

2170


What happens if you use a wrong connect identifier?

1135


How to compare dates in oracle sql?

1159


What is a initialization parameter file in oracle?

1081


What is translate in oracle?

1140


How to list all indexes in your schema?

1140


What is recycle bin in Oracle?

1191


How can you use check constraints for self referential integrity?

1013


how to clone 9i Database on to 10g Database.

2383