getting sum of units sold in preceeding weeks

From: Nikhil (anonymous_at_discussions.microsoft.com)
Date: 05/11/04


Date: Mon, 10 May 2004 21:31:04 -0700

i have a table where daywise i have details of units sold..i want to have a query which takes today (getdate()) and then calculates the no.ofunits sold in 7 preceeding days as week1, 8-14 preceeding days as week2, and so on for 3 preceding months (approx 12 preceeding weeks)..

can anyone plz suggest how i go about with this..i guess...i have either to use the while syntax...

plz respond asap

regards

Nikhil