为什么即使条件为真,我的SQL代码也不会返回结果?
这是我的SQL代码:
SELECT DateOfPurchased AS [Date],
COUNT(TransactionID) AS [Total transaction],
COUNT(CustomerID) AS [Number of Customers],
SUM(Quantity) AS [Total Quantity],
SUM(Books.Price * Transactions.Quantity) AS [Sum Of Sales]
FROM Transactions INNER JOIN Books ON Books.BookID = Transactions.BookID
WHERE DateOfPurchased = #04/10/2017#
GROUP BY DateOfPurchased
答案 0 :(得分:0)
您是否将日期存储为一般日期,因此也包括时间?这是我可以复制你的问题的唯一方法。