ExamQuestions.com

Register
Login
Oracle Datbase 12c SQL Exam Questions

Oracle

Oracle Datbase 12c SQL

100 / 120

Question 100:

Examine the structure of the ORDERS table: (Choose the best answer.) 
image
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? 

Answer options:

A. It executes successfully but does not give the correct output.
B. It executes successfully and gives the correct output.
C. It returns an error because the TO_CHAR function is not valid.
D. It return an error because the datatype conversion in the SELECT list does not match the data type conversion in the GROUP BY clause.