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

consider a table which contain 4 columns,ename,eno,sal and
deptno, from this table i want to know ename who having
maximum salary in deptno 10 and 20.

Answer Posted / ashim

select * from (select id,dept,sal,dense_rank() over
(partition by dept order by sal desc) p from a_tab1)
where p=1

....by using this program we can find out the nth salary of
different department jus give p=n

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How you can copy a file to file content and file to pl/sql table in advance pl/sql?

1131


Can we join tables without foreign key?

947


Can you rollback after commit?

965


What does plv msg allows you to do?

1122


What is anonymous block in sql?

1107


Is vs as in pl sql?

968


What is a recursive stored procedure?

1160


what is recursive stored procedure? : Sql dba

971


What is on delete restrict?

988


Which join is like an inner join?

1011


What is a delimiter in sas?

1035


How does one use sql*loader to load images, sound clips and documents? : aql loader

1162


What is clustered index in sql?

1040


What is difference between db2 and sql?

982


explain the difference between myisam static and myisam dynamic. : Sql dba

927