QuestionQ32

VerifiedReporting Aggregated Data Using the Group Functions

Examine the structure of the employees table.

Question Image

You want to display the maximum and minimum salaries for employees hired 1 year ago. Which two statements produce the correct output?

Question Image

Choose two
Explanation

MIN and MAX aggregate the filtered salary rows into their lowest and highest values. The aggregation can occur in the outer query after an inline view filters salary values, or in the inline view before its output columns are grouped. Oracle does not permit aggregate functions such as MIN or MAX in a GROUP BY clause, so statements that place them there are invalid.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!