---------------------------... --SQL Server - left join data sums/counts/averages to date range to account for zero days or zero weeks --use recursive common table expression (CTE) and nested CTEs to accumulate "data dates" over the latest "n" weeks ---------------------------... ---------------------------...