Q&A about the site for members of the workforce navigating the professional setting
WITH accountsByDate AS ( SELECT CAST(u.LastAccessDate AS DATE) as [Date], COUNT(*) as numUsers FROM Users u GROUP BY CAST(u.LastAccessDate AS DATE) ) SELECT a.[Date], AVG(a.numUsers) OVER ( ORDER BY a.[Date] ROWS BETWEEN ##MovingAvg:int?20## PRECEDING AND CURRENT ROW ) FROM accountsByDate a