nerdexam
Oracle

1Z0-071 · Question #162

See the Exhibit and examine the structure of the PROMOTIONS table: Using the PROMOTIONS table, you need to find out the average cost for all promos in the range $0-2000 and $2000-5000 in category A…

The correct answer is B. It executes successfully and gives the required result. See the full explanation below for the reasoning.

Question

See the Exhibit and examine the structure of the PROMOTIONS table:

Using the PROMOTIONS table, you need to find out the average cost for all promos in the range $0-2000 and $2000-5000 in category A. You issue the following SQL statements:

What would be the outcome?

Exhibit

1Z0-071 question #162 exhibit

Options

  • AIt generates an error because multiple conditions cannot be specified for the WHEN clause.
  • BIt executes successfully and gives the required result.
  • CIt generates an error because CASE cannot be used with group functions.
  • DIt generates an error because NULL cannot be specified as a return value.

How the community answered

(16 responses)
  • B
    81% (13)
  • C
    6% (1)
  • D
    13% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-071 Practice