SUM in a Query

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
 
D

Duane Hookom

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.
 
K

KARL DEWEY

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top