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 / suman rana

--venkat u r almost correct, since u have used "" (double
quotes) so column name will be come case sensitive.

select * from (
select e.deptno,d.dname,e.sal,dense_rank() over (
partition by e.deptno
order by e.sal desc ) RANK, e.ename
from emp_test e,dept_test d where e.deptno=d.deptno)
where rank=2

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 a server parameter file in oracle?

1004


What is connection pool in oracle?

930


What are the different windows events activated at runtime ?

2834


How to turn on or off recycle bin for the session?

1037


What is the use of file param in imp command?

1117


What is a partition in oracle?

1039


What are nested tables?

1107


How to write a query with a right outer join in oracle?

1113


Explain how are indexes update?

1016


Does oracle database need java?

944


How would you configure your networking files to connect to a database by the name of DSS which resides in domain icallinc.com?

1873


How many types of synonyms in Oracle?

1066


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

993


How to write a left outer join with the where clause in oracle?

1027


Can we write insert statement in function in oracle?

1027