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
How to create id with auto_increment on oracle?
What is data file?
How to use "in out" parameter properly?
How do I manually create a database in oracle?
What is a nested table and how is it different from a normal table?
What is the order of defining local variables and sub procedures/functions?
What are the attributes of the cursor?
What is set operator oracle?
How to change user password in oracle?
How to enter a new row into a table interactively?
What is bulk load in oracle?
What is user managed backup in Oracle?
How to define a procedure inside another procedure?
What is PL/SQL ?
What is bind variable in oracle 11g?