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

Explain oracle data types with examples?

1010


What is a dead lock in oracle?

1097


What is recovery manager(rman) backup in Oracle?

1171


Can u please explain me the Discussion on Except ,using cast like type cast. Question in the context of difference between two tables

2045


What is a sub query? Describe its types?

997


How to build data dictionary view an new database?

989


How to test null values?

1080


What is a trigger and what are its types in oracle?

1054


List the types of joins used in writing subqueries?

980


What would you do with an in-doubt distributed transaction?

1958


How to use "in" parameter properly?

1047


What is the difference between pre-select and pre-query?

1190


Explain oracle instance.

1157


What are ddl statements in oracle?

1047


if you ctreate table identity

2353