You have a table named 'CUSTOMER ORDERS with columns `customer id', `order date' , and
'order amount'. You want to retrieve the top 5 customers who placed orders on a specific date ('2023-01-15') based on the total order amount. Which SQL query will achieve this?
Correct Answer: A
Option A is the correct query. It filters the data for the specific date, groups the results by
`customer_id' to calculate the total order amount for each customer, orders the results in descending order based on the total amount, and then limits the output to the top 5 customers.
Option B has the WHERE clause in the wrong order. Option C misses the GROUP BY clause, resulting in only one row. Option D does not sum the order amounts. Option E is not valid Snowflake SQL; Snowflake does not use TOP clause. It is standard SQL to use the LIMIT clause.