Problems / Resurrected Users / Editorial
LAG(event_time) OVER (PARTITION BY user_id ORDER BY event_time)
DATE_DIFF('day', prev, current) > 30
Resurrection is a property of a transition between consecutive events, and LAG is the transition detector: it turns a time series into (previous, current) pairs you can filter with plain WHERE logic. Notice what stays out of the query — no sessionization, no calendars, no self-joins. When a metric reads as "an X whose relation to the previous X satisfies P", the LAG-then-filter shape is almost always the whole answer.
Solve Resurrected Users yourself →