我想为这个问题写一个查询:
显示 1997 年 8 月没有下订单的日子。
我可以找到下订单的天数,但是如何找到没有下订单的天数?
这显示了下订单的日期:
SELECT
o.OrderID,
day(o.OrderDate) AS 'Date',
sup.CompanyName
FROM
Orders o
INNER JOIN OrderDetails od ON o.OrderID = od.OrderID
INNER JOIN Products p ON od.ProductID = p.ProductID
INNER JOIN Suppliers sup ON p.SupplierID = sup.SupplierID
WHERE
sup.CompanyName = 'Tokyo Traders'
AND o.OrderDate BETWEEN '1/1/1997' AND '1/31/1997'