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

Is grant a ddl statement?

854


Can we use joins in subquery?

1086


How to make a copy values from one column to another in sql?

981


Why are indexes and views important to an organization?

898


What is compute?

1011


explain mysql aggregate functions. : Sql dba

939


What is full form of rtm?

953


How do I find duplicates in sql?

877


Is nosql relational?

893


Explain the significance of the & and && operators in pl sql.

950


How many sql are there?

924


How do I remove sql developer from windows 10?

1012


how to extract a unit value from a date and time? : Sql dba

946


What is the example of procedure?

874


How do I partition in sql?

904