错误代码1146
MySQL Bench
SELECT email_address,
count(orders.order_id) AS NUMBER_OF_ORDERS,
sum((item_price-discount_amount)*Quantity) AS Total_ORDER
FROM customers
JOIN orders ON customers.customer_id = orders.customer_id
JOIN OrderItems ON orders.order_id = order_items.order_id
GROUP BY Email_Address
HAVING COUNT(orders.OrderID) > 1
ORDER BY Total_ORDER DESC