SUM in a Query

  • Thread starter Thread starter jorlypong
  • Start date Start date
J

jorlypong

I have a table with thousands of transactions (Has an Item, Date, and Qty
columns). I want to create a query that returns the sum of item transactions
that occur after 4-22-09. When I do this it finds the items that were in a
transaction after 4-22-09. So far so good but then it returns the running
total of qty both before and after 4-22-09 for those selected items. How do
I get it to return the qty sum only after 4-22-09.

Please respond plainly as I am not an access terminology guru.

Thank you
 
If you want the sum by Item, then use this SQL:

SELECT Item, Sum(Qty) as SumQty
FROM [with thousands of transactions]
WHERE [date]>#4/22/2009#
GROUP BY Item;

If you only one a single sum, the remove the Item column from the SQL.
 
it returns the running total of qty both before and after 4-22-09 for those
selected items.
Where is the 'running total of qty' being displayed? Post the SQL of your
query.
 
Back
Top