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 to write date and time interval literals in oracle?

1082


What is the difference between hot backup and cold backup in oracle?

1078


What is the difference between translate and replace in oracle?

1218


Why packages are used in oracle?

1119


Explain the importance of .pll extension in oracle?

1061


How do you store pictures in a database?

1060


Tab A A B ------ 1 A 2 B 3 C Tab B A B ----- 4 D 5 E 6 F Generate the value into B table from A table. Only table A has the value. Write the SQL query to get B table value.

1836


what are the advantages of running a database in archive log mode?

2258


what is dynamic SGA and static SGA

4491


How to find the duplicate rows count from employees table in oracle?

1148


What is a named program unit?

1138


If any one has information regarding interview of NIC (National Informatics Centre),it would be of great help...

2288


How to assign a table row to a record variable?

1094


How to rename an index in oracle?

1172


What is the scope of a local variable?

1123