The analytics team tracks Weekly Active Users (WAU). Using the user_events table, return week (the start of each ISO week, truncated to Monday) and active_users (distinct users who had at least one event that week), ordered by week ascending.
user_events
| column | type |
|---|---|
| id | INTEGER |
| user_id | INTEGER |
| event_type | TEXT |
| event_date | DATE |
| id | user_id | event_date |
|---|---|---|
| 1 | 1 | 2024-01-01 |
| 2 | 2 | 2024-01-01 |
| 3 | 1 | 2024-01-08 |
| 4 | 3 | 2024-01-08 |
| week | active_users |
|---|---|
| 2024-01-01 | 2 |
| 2024-01-08 | 2 |