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

select top 3 sal from each dept?

Answer Posted / chiru

select *
from (select row_number() over(partition by deptno order by sal desc) r,
b.*
from (select rownum num, a.* from emp a order by sal desc) b)
where r <= 3

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between distinct and unique in sql?

895


What is a left inner join?

966


Are there any features that are decommissioned in 11g that are not present in 11g?

2089


Is record in pl sql?

930


Is sql developer case sensitive?

957


What is difference sql and mysql?

953


Can we perform dml on view?

988


What is left join example?

904


What are the set operators in sql?

1042


What is embedded sql in db2?

974


What are sql ddl commands?

1052


What are the types of join and explain each?

1001


What is on delete set null?

1050


What are commit, rollback, and savepoint?

954


Show code of a cursor for loop.

1022