Slight variation: DECLARE @Temp table (Room VARCHAR(15), BookDate DATE)INSERT @Temp VALUES('A', GETDATE() - 7),('B', GETDATE() - 5),('C', GETDATE() - 3),('D', GETDATE()),('E', GETDATE() + 1),('F', GETDATE() + 2),('G', GETDATE() + 5),('H', GETDATE() + 8),('I', GETDATE() + 11),('J', GETDATE() + 12),('K', GETDATE() + 15),('L', GETDATE() + 16);WITH Cte AS( SELECT (((DAY(BookDate) - 1) / 7) + 1) AS WeekNum, COUNT(*) BookCount FROM @Temp GROUP BY (((DAY(BookDate) - 1) / 7) + 1))SELECT A.WeekNum, SUM(B.BookCount)FROM Cte AS AINNER JOIN Cte AS B ON A.WeekNum >= B.WeekNumGROUP BY A.WeekNum