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

select * from emp e where 2 = ( select count(distinct sal)
from emp e1 where e1.deptno = e.deptno and E.SAL <= E1.SAL)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Calculate difference between 2 date / times in oracle sql?

1040


Explain oracle’s system global area (sga).

1139


List the various oracle database objects?

1057


What is meant by raw datatype?

1060


How can we find out the current date and time in oracle?

1088


What is a Garbage Collection? and what is full recursive Garbage collection?

2902


Explain the use of rows option in imp command.

1085


Whether any commands are used for months calculation? If so, what are they?

1097


How to connect to a remote server?

1125


I have a parent program and a child program. I want to write a statement in Exception Block of the parent program so that when the statement in the exception block is executed, the control goes to the next statement in the parent block bypassing the child block.How do i do that?

2461


What is meant by recursive hints in oracle?

1086


How to select some columns from a table in oracle?

1093


Explain the use of record option in exp command.

1006


What query tells you how much space a tablespace named test is taking up, and how much space is remaining?

2275


Explain table?

1115