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
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)- A3% (1)
- B8% (3)
- C18% (7)
- D72% (28)
Community Discussion
No community discussion yet for this question.
