← Problems2. Rolling 7-day active usersMediumSQL
00:00 / 20:00

Rolling 7-day active users

Medium·Acceptance ·Asked at Amazon

Return the count of distinct users active in each trailing 7-day window, one row per day, ordered by day.

Topics

window functions

Similar problems

Community-reported interview topic. Not an official company question and no affiliation is implied.

solution.sql
Loading editor…
Draft not saved yet · Spaces 4 · UTF-8 · ⌘↵ run, ⌘⇧↵ submit
Nothing run yet

Run against the public tests, or submit to score against all of them.