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 to rename a column in the output of sql query?

1131


how to show all tables with 'mysql'? : Sql dba

1158


How to write html code in pl sql?

1161


what are the 'mysql' command line arguments? : Sql dba

1192


What is right join sql?

1013


What are the advantages of sql? Explain

1156


Why is partition used in sql?

1190


What is sorting in sql?

985


What is parallel hint?

1415


Explain the rollback statement?

1072


Which command is used to delete a trigger?

1407


how can you see all indexes defined for a table? : Sql dba

1053


Is oracle sql free?

1039


Which is faster union or join?

1027


How do you add a column to a table?

1105