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 a private synonyms?
If youre unsure in which script a sys or system-owned object is created, but you know its in a script from a specific directory, what UNIX command from that directory structure can you run to find your answer?
What is execute immediate in oracle?
What is a cursor variable?
How to update values on multiple rows in oracle?
What is catalog in Oracle?
How to do clean up if create database failed?
How do I use unicode codesets with the weblogic jdriver for oracle driver?
How to create id with auto_increment on oracle?
How to convert numbers to characters in oracle?
How many file formats are supported to export data?
What is a sub query? Describe its types?
Give the various exception types.
How to define an explicit cursor in oracle?
Differentiate between post-database commit and post-form commit?