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

Table E:
Name dept month sal
1 A JAN 800
2 B APR 1000
3 A JAN 300
4 A JAN 600
5 C JUN 400


1) SELECT HIGHEST SAL PAID DEPT IN JAN MONTH?
2) WRITE QUERY GET MAX SAL DEPT NO?

Answer Posted / suman rana

select dept from ( select dept,
max(sal) over() maxsal,
sal from ( select dept,
max(sal) sal
from E
where month=JAN'
group by dept
)
) WHERE maxsal = sal;


select distinct dept from ( select dept, max(sal) over ()
maxsal, sal
from E
)
where maxsal = sal;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create id with auto_increment on oracle?

1040


What is data file?

1150


How to use "in out" parameter properly?

1102


How do I manually create a database in oracle?

1069


What is a nested table and how is it different from a normal table?

1106


What is the order of defining local variables and sub procedures/functions?

1113


What are the attributes of the cursor?

1057


What is set operator oracle?

1034


How to change user password in oracle?

1094


How to enter a new row into a table interactively?

1049


What is bulk load in oracle?

1125


What is user managed backup in Oracle?

1204


How to define a procedure inside another procedure?

1067


What is PL/SQL ?

2220


What is bind variable in oracle 11g?

1095