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

How can you tell how much space is left on a given file system and how much space each of the file systems subdirectories take-up?

2870


Explain the use of analyse option in exp command.

1187


What exactly do quotation marks around the table name do?

1016


What are the parameters that we can pass through a stored procedure?

1112


How to create a server parameter file?

1182


What is query image?

1023


How would you change old and new values in an insert, delete and update triggers?

1072


Explain table?

1174


What is an oracle table?

1031


For a field in a repeating frame, can the source come from the column which does not exist in the data group which forms the base for the frame ?

2063


What is a tns service name?

1054


What is the difference between postgresql and oracle?

1101


What are the limitations oracle database 10g xe?

1089


What is connection pool in oracle?

1033


What are the attributes of cursor?

1104