无法运行我的sql代码,错误代码为1146

时间:2019-10-05 02:39:03

标签: mysql mysql-error-1146

错误代码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

0 个答案:

没有答案