nerdexam
Oracle

1Z0-071 · Question #372

Table ORDER_ITEMS contains columns ORDER_TO, UNIT_PRICE and QUANTITY, of data type NUMBER. Examine these SQL statements: Statement 1: Statement 2: Which two statements are true? (Choose two.)

The correct answer is A. Statement 2 may return multiple rows of output. E. Statement 1 returns only one row of output. https://stackoverflow.com/questions/12366390/how-to-select-product-that-have-the-maximum- price-of-each-category

Reporting Aggregated Data Using the Group Functions

Question

Table ORDER_ITEMS contains columns ORDER_TO, UNIT_PRICE and QUANTITY, of data type NUMBER. Examine these SQL statements:

Statement 1:

Statement 2:

Which two statements are true? (Choose two.)

Options

  • AStatement 2 may return multiple rows of output.
  • BBoth statements will return NULL if either UNIT_PRICE or QUANTITY contains NULL.
  • CStatement 2 returns only one row of output.
  • DBoth the statements give the same output.
  • EStatement 1 returns only one row of output.

How the community answered

(57 responses)
  • A
    74% (42)
  • B
    7% (4)
  • C
    16% (9)
  • D
    4% (2)

Explanation

https://stackoverflow.com/questions/12366390/how-to-select-product-that-have-the-maximum- price-of-each-category

Topics

#aggregate functions#NULL propagation#GROUP BY#single vs multi-row output

Community Discussion

No community discussion yet for this question.

Full 1Z0-071 Practice