错误代码 1146
MySQL 工作台
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