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 / venkat

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 ?    9 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what happened to the global index when I truncate the data in one of the partition?

2065


What is a data lock in oracle?

1178


Difference between hot backup vs. Cold backup?

1036


What is a trace file and how is it created in oracle?

1139


How to synchronize 2 schema's objects?

2232


Does oracle charge for java?

1112


what is IDE,DMV in sql server?

2878


Can sub procedure/function be called recursively?

1045


What is the database name in oracle?

1076


Can you have more than one content canvas view attached with a window ?

2368


Can we store pictures in the database and if so, how it can be done?

1089


What is system global area (sga) in oracle?

1031


How would you begin to troubleshoot an ORA-3113 error?

2122


What is a tns service name?

1054


What is pragma autonomous transaction in oracle?

1121