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
Explain the importance of .pll extension in oracle?
Explain the use of record length option in exp command.
What are the tools for Oracle ?
How to declare a local variable?
What is the difference between count (*), count (expression), count (distinct expression)?
What is meant by raw datatype?
How can I convert single byte kana characters into multi byte kana characters and vice-versa.
What is a private synonym?
How to apply filtering criteria at group level in oracle?
How to create a new table in your schema?
What are advantages of dateset in datastage?
defination of bitmap index
how can db_files > maxdatafiles since db_files is for instance and the later is for database
What is a Garbage Collection? and what is full recursive Garbage collection?
Explain what are synonyms used for?