QuestionQ11

VerifiedUsing Conversion Functions and Conditional Expressions

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

Question Image

Assess the following SQL statement:

Question Image

Which statement is true about the result of the preceding query?

Explanation

AVG(promo_cost) returns one scalar value for the TV category, so it can be compared with each row's promo_cost in a searched CASE expression. Because the outer query selects from promotions without a WHERE clause, it returns COST_REMARK for every promotion row, classifying each as HIGH or LOW relative to the average cost of TV promotions.

Learn more

Community Discussion

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