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

Can we insert data in view?

1006


how many values can the set function of mysql take? : Sql dba

1030


What is a sql*loader control file?

1337


Can a foreign key be null?

1142


Is mariadb nosql?

1088


What is the size of partition table?

1088


How do I run pl sql in sql developer?

1166


What is dense_rank?

986


Why does sql need a server?

1083


Does view store data in sql?

1035


What is normalization in sql?

1060


What is a sql driver?

1035


Where the sql database files are stored?

1071


what happens if you no create privilege in a database? : Sql dba

1045


What are the syntax and use of the coalesce function?

1271