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

How do you find out from the RMAN catalog if a particular archive log has been backed-up?

2126


What happens if the imported table already exists?

1035


What is a synonym? What are its various types?

1110


What is primefaces used for?

1052


What are the benefits of ordbms?

1088


What is Library Cache in Oracle?

1144


How do I use os authentication with weblogic jdriver for oracle and connection pools?

1054


How can we find out the duplicate values in an oracle table?

1050


What are set operators?

1089


What is set operator oracle?

986


What happens to the indexes if a table is recovered?

993


What is tns name?

984


Is oracle a language?

953


Can we commit inside a function in oracle?

968


What is coalesce function?

1078