If you changed fieldname "Date" to a
non-reserved word like "ShipDate",
to sum *all parts* shipped by week:
SELECT
Sum([Quantity Shipped]) As SumShipped,
Max([ShipDate]) As SortDate,
DatePart('ww',[ShipDate]) & "-" & Year([ShipDate]) As WeekGroup
FROM
yourtable
GROUP BY
DatePart('ww',[ShipDate]) & "-" & Year([ShipDate])
ORDER BY
Max([ShipDate])
to break out sums for each part #:
SELECT
[part #],
Sum([Quantity Shipped]) As SumShipped,
Max([ShipDate]) As SortDate,
DatePart('ww',[ShipDate]) & "-" & Year([ShipDate]) As WeekGroup
FROM
yourtable
GROUP BY
[part #],
DatePart('ww',[ShipDate]) & "-" & Year([ShipDate])
ORDER BY
Max([ShipDate])
Please respond back if I have misunderstood.
Gary Walter
Thanks for the reply. What I'm looking for though, is to
be able to run a query that SUMs each weekly total rather
than me extracting only the data for one week at a time.
Similar to what you'd do if you selected "Month" in the
Group options.
I suppose that I must first need to define what a week
is - Sunday to Saturday - Weekdays only - etc... But I'm
completely stumped on where to begin.
Tim