QuestionQ82

VerifiedReporting Aggregated Data Using the Group Functions

The SALES table contains the PROD_ID and QUANTITY_SOLD columns, both with the NUMBER data type.

Which two queries run successfully?

Choose two
Explanation

WHERE filters individual rows before grouping and cannot contain aggregate functions such as COUNT. HAVING filters grouped results and can contain COUNT. A valid grouped query must place WHERE before GROUP BY, include each nonaggregated selected column in the GROUP BY clause, and use HAVING for aggregate-based filtering.

Community Discussion

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