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

Explain the importance of .pll extension in oracle?

956


Explain the use of record length option in exp command.

1027


What are the tools for Oracle ?

1009


How to declare a local variable?

1055


What is the difference between count (*), count (expression), count (distinct expression)?

966


What is meant by raw datatype?

1005


How can I convert single byte kana characters into multi byte kana characters and vice-versa.

2332


What is a private synonym?

1531


How to apply filtering criteria at group level in oracle?

987


How to create a new table in your schema?

1035


What are advantages of dateset in datastage?

2202


defination of bitmap index

2047


how can db_files > maxdatafiles since db_files is for instance and the later is for database

2577


What is a Garbage Collection? and what is full recursive Garbage collection?

2846


Explain what are synonyms used for?

983