QuestionQ145

VerifiedUsing Subqueries

Refer to the exhibit and review the structure of the PRODUCTS table.

Which two tasks require subqueries?

Question Image

Choose two
Explanation

A subquery is needed when a row value must be compared with an aggregate calculated over the full table. Both the table-wide average PROD_LIST_PRICE comparison and the comparison of PROD_MIN_PRICE with that average require an aggregate result from an inner query; the status condition in the latter can remain in the outer query. Oracle defines a subquery as a query nested within another SQL statement and documents that aggregate functions produce summary results over a set of rows.

Learn more

Community Discussion

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