Answer:
1. SELECT Order.customer_id, SUM(order_total) AS 'Total_order'
FROM Order JOIN Order_item
WHERE Order.customer_id = Order_item.customer_id
GROUP BY Order.customer_id
2. SELECT Order.customer_id, SUM(order_total) AS 'Total_order' , order_date
FROM Order JOIN Order_item
WHERE Order.customer_id = Order_item.customer_id
GROUP BY Order.customer_id, Order_item.order_date
ORDER BY Order_item.order_date
Step-by-step explanation:
Both SQL queries return the total order from the joint order and order_item tables, but the second query returns the total order and their data grouped by customer and order date and also ordered by the order date.