Rolling 7 day average DAU
Return one row for every calendar date from the first event date to the last event date, including days where nobody did anything.
dauis the number of distinct users active that day (0 on empty days)avg_7dis the averagedauover that day and the 6 days before it, rounded to 2 decimal places. Empty days count as 0 in the average.- for the first 6 dates there isn't a full week yet, so
avg_7dis NULL there
output columns
activity_datedauavg_7duses
ctrl + enter to run on the sample data · ctrl + shift + enter to submit
run your query to see the output here. Submit checks it against the sample data, hidden test cases, random data and a large dataset.