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


Please Help Members By Posting Answers For Below Questions

Can you drop an index associated with a unique or primary key constraint?

587


how to convert .db (extention) database file into .dmp (extention ) for oracle database ?

2067


What are the differences between primary key and unique key?

515


What is rich query?

544


What is a sub query and what are the different types of subqueries?

629






Difference between oracle's plus (+) notation and ansi join notation?

581


Explain table?

656


List out the types of joins.

595


What is the disadvantage of User defind function?

1836


How to create a new user account in oracle?

584


How do we create privileges in oracle?

588


What is sequence?

625


What are the database administrators utilities available?

580


What do you understand by a database object?

589


Differentiate between function and procedure in oracle.

561