I have a query that was built with help from this forum using Between date. I need it to be a bit more sensitive, I need yesterday's sales, but I need it to stay within 9:30am to 12:30am (following day), it's a liquor store.
I would also love to be able to get a total value of the SumOfSales column.
Thanks in advance for any help/guidance.
tables:
Query:
I would also love to be able to get a total value of the SumOfSales column.
Thanks in advance for any help/guidance.
tables:
Code:
Product Code
Description
Transaction Number
Quantity
Sales Value
Cost
Transaction Date
Transaction Time
Department
Type Code
Cashier
Computer Name
Customer Code
Query:
Code:
SELECT [product history].[transaction date], [product history].[Product Code], [product history].[description one] AS Brand, Sum([product history].Quantity) AS SumOfQuantity, Sum([product history].[Sales Value]) AS [SumOfSales Value]
FROM [product history]
WHERE ((([product history].[Transaction Date]) Between Date()-1 And Date()) AND (([product history].[department])='01')) and [transaction time] >= '9:30:00 AM' and [transaction time] <='12:30:00 AM'
GROUP BY [product history].[transaction date], [product history].[Product Code], [product history].[description one];