nerdexam
Oracle

1Z0-071 · Question #118

Examine the structure of the ORDERS table: (Choose the best answer.) You want to find the total value of all the orders for each year and issue this command: SQL> SELECT TO_CHAR(order_date,'rr')…

The correct answer is D. It return an error because the datatype conversion in the SELECT list does not match the data. See the full explanation below for the reasoning.

Question

Examine the structure of the ORDERS table: (Choose the best answer.) You want to find the total value of all the orders for each year and issue this command:

SQL> SELECT TO_CHAR(order_date,'rr'), SUM(order_total) FROM orders GROUP BY TO_CHAR(order_date, 'yyyy'); Which statement is true regarding the result?

Exhibit

1Z0-071 question #118 exhibit

Options

  • AIt executes successfully but does not give the correct output.
  • BIt executes successfully and gives the correct output.
  • CIt returns an error because the TO_CHAR function is not valid.
  • DIt return an error because the datatype conversion in the SELECT list does not match the data

How the community answered

(39 responses)
  • A
    3% (1)
  • B
    8% (3)
  • C
    18% (7)
  • D
    72% (28)

Community Discussion

No community discussion yet for this question.

Full 1Z0-071 Practice