Reputation: 3
I'm looking a way to calculate the total quantity purchased between a specific dates and returns just one entry based on the item name. Here's the sample of my table and the result that I need:
Sample Table
I'm not sure if Access have the capability to do this, I tried to use different formula and even grouping it together, but it didn't come out as what I need. I did quite a bit of research as well, but none of them have the result I want. I really need to know the answer, it driving me nuts. Anyway, thank you beforehand for anyone that can help me.
Upvotes: 0
Views: 9078
Reputation: 4312
Here's a sample:
SELECT Sum(Table1.Quantity'SUM) AS SumOfQuantity'SUM, Table1.ItemName
FROM Table1
WHERE (((Table1.PurchaseDate) Between #1/1/2000# And #12/31/2015#))
GROUP BY Table1.ItemName;
Upvotes: 2