hard · ~12 min
Product analytics needs a monthly user churn report derived from activity.
activity
M
00:00:00
M + 1
active_users
churned_users
churn_pct
churned_users * 100.0 / active_users
month
Input contract: event_id is unique and non-null in activity; user_id and event_time are non-null. A user may generate multiple events in the same month and may return in later months after skipping a month.
event_id
user_id
event_time