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 background process in Oracle?

1108


How to experiment a data lock in oracle?

1060


What is oracle data type?

973


Difference between oracle's plus (+) notation and ansi join notation?

1111


How to create a server parameter file?

1142


Explain mutating triggers.

1034


How to call a stored function with parameters?

1049


Can you assign multiple query result rows to a variable?

993


What privilege is needed for a user to query tables in another schema?

974


How to use "if" statements on multiple conditions?

1175


What do you mean by redo log file mirroring?

1037


what is insert all statement in sql

6528


what is port in oracle? how is it related to database application.

1950


What is a database table in oracle?

1026


What is the use of oracle?

1031