This technical problem asks the reader to write a SQL query to find the average order value for each customer, given a table of customer orders. An example input and output is provided.
The solution above is optimal because it uses the GROUP BY clause to group the orders by customer_id, and then uses the AVG function to calculate the average order value for each customer.
Evaluated at: 2022-11-26 08:15:56