 <pre><code>;WITH n(n) AS -- just 4 rows - makes it easy to extend to 5 weeks, 6 weeks, etc. ( SELECT 0 UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 ), d(dt) AS -- single row with the end of the current week -- this could be a variable but I get a lot of flack for not inlining ( SELECT dt = CONVERT(DATE, DATEADD(DAY, 7-DATEPART(WEEKDAY, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP))), w(dt) AS -- get the end of each week based on the rows in n ( SELECT DATEADD(WEEK, -n.n, d.dt) FROM n CROSS JOIN d ) SELECT w.dt, SUM(CASE WHEN e.term_date &gt;= DATEADD(DAY, -90, w.dt) AND e.term_date &lt; DATEADD(DAY, 1, w.dt) AND e.hired_date &gt;= DATEADD(DAY, -90, w.dt) AND e.hired_date &lt; DATEADD(DAY, 1, w.dt) THEN 1 ELSE 0 END) FROM dbo.Employees AS e CROSS JOIN w GROUP BY w.dt ORDER BY w.dt DESC; </code></pre>