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...

i need department wise top 2 employees salary.which logic
i will use

Answer Posted / ramya p

select deptno, max(sal) from (select * from emp order by
sal desc)
where rownum < 3
group by deptno
order by max(sal) desc;

Is This Answer Correct ?    5 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why trigger is used in sql?

914


What is crud diagram?

877


how to check myisam tables for errors? : Sql dba

1257


What is inner join in sql?

1001


How to get help at the sql prompt?

1052


i have some prob lem to tell me about my self in interview first round ...

2114


What is trigger and stored procedure in sql?

976


Does postgresql run on the cloud?

1074


Explain the working of foreign key?

976


What is difference between mysql and postgresql?

1043


Define SQL and state the differences between SQL and other conventional programming Languages?

1141


How do you delete data from a table?

974


Is delete faster than truncate?

957


What is sap sql?

928


what is the difference between mysql_fetch_object and mysql_fetch_array? : Sql dba

985