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 / parag
1) SELECT DISTINCT DEPT FROM TABLE
WHERE SAL >=
(SELECT MAX(SAL) FROM TABLE
WHERE MONTH = 'JAN');
2) SELECT DISTINCT DEPT, SAL FROM TABLE
WHERE SAL >=
(SELECT MAX(SAL) FROM TABLE);
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
How to use regular expression in pattern match conditions in oracle?
What are a cluster and non-cluster index?
Where are the settings stored for each instance in oracle?
What is meant by joins?
WHAT IS THE DEFINITION OF DEFAULT CUSTOMER IN AR?
How many types of cluster table in Oracle?
How to create a new view in oracle?
What is the quickest way to export a table to a flat file?
what happened to the global index when I truncate the data in one of the partition?
when we are importing items in inventory, showing errors, Oracle support suggested us for running scripts & also suggested if we run scripts, iprocurement applicaation if is there it will show shared and if we go in future for iprocurement, it wont work. So kinldy suggest any functional solution.
How to define a variable to match a table column data type?
What is the scope of a local variable?
How to create a new user account in oracle?
What is oracle analytical function?
How to convert raw data type into text in oracle? Explain