Calculating Total Aggregate Sales In Microsoft Access Within Specific Time Period?

I have 2 tables, Product and Sales. I am looking to find the TOTAL SALES of a EACH product within a specific time period. They are related by Product_ID, but using the SQL below does not give me the total for each product, instead it separates the totals into different transaction dates. Help please!
SELECT PRODUCTS.PRODUCT_ID, Sum(SALES.SALES) AS SumOfSALES, SALES.TRANSDATE
FROM PRODUCTS INNER JOIN SALES ON PRODUCTS.PRODUCT_ID = SALES.PRODUCT_ID
GROUP BY PRODUCTS.PRODUCT_ID, SALES.TRANSDATE
HAVING (((SALES.TRANSDATE)>=#9/1/2008# And (SALES.TRANSDATE)<=#12/31/2008#));

Both comments and pings are currently closed.

Comments are closed.

Powered by WordPress | Designed by: free css template | Thanks to hostgator coupon and web hosting reviews