medium · ~12 min
Lifecycle marketing needs a dormant-account audit as of the fixed reference date 2024-06-30.
users
last_activity_date
00:00:00
event_time
activity
days_dormant
2024-06-30
user_id
username
Input contract: user_id is unique and non-null in users; username is non-null. event_id is unique and non-null in activity; user_id and event_time are non-null, and a user in users may have zero, one, or many rows in activity.
event_id