nerdexam
Oracle

1Z0-071 · Question #241

View the Exhibit and examine the structure of the SALES table. The following query is written to retrieve all those product IDs from the SALES table that have more than 55000 sold and have been…

The correct answer is C. It produces an error because COUNT (*) should be only in the HAVING clause and not in the. See the full explanation below for the reasoning.

Question

View the Exhibit and examine the structure of the SALES table. The following query is written to retrieve all those product IDs from the SALES table that have more than 55000 sold and have been ordered more than 10 items. Which statement is true regarding this SQL statement?

Exhibits

1Z0-071 question #241 exhibit 1
1Z0-071 question #241 exhibit 2

Options

  • AIt executes successfully and generates the required result.
  • BIt produces an error because COUNT (*) should be specified in the SELECT clause also.
  • CIt produces an error because COUNT (*) should be only in the HAVING clause and not in the
  • DIt executes successfully but produces no result because COUNT(prod_id) should be used instead

How the community answered

(50 responses)
  • A
    14% (7)
  • B
    2% (1)
  • C
    78% (39)
  • D
    6% (3)

Community Discussion

No community discussion yet for this question.

Full 1Z0-071 Practice