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
What is oracle instant client?
What is not equal to in oracle?
What is a initialization parameter file in oracle?
What is an oracle function?
Which are the five query types available in oracle?
what is difference between sql plus and sql*plus? (not sql and sql plus).
How to use in conditions in oracle?
How to create a single index for multiple columns?
Describe the types of sub query?
hi friends i completed b.com 2004.i have 3y accounting exp. in manufacturing company.now i have completed oracle finance.pls suggest me how will get job in oracle.can i get job in oracle.
What is flashback in Oracle?
What is sharded cluster?
how the Oracle Prepares the Execution Plan and how it chooses the Optimal one?
Can you drop an index associated with a unique or primary key constraint?
Explain a synonym?