How long before people come back?

MediumNetflixleadreactivationdate math· 20 XP

Some Netflix subscribers cancel and later start a new subscription. The retention team wants to know how long those breaks usually are.

For every subscription that ended and was followed by another subscription from the same user, show the number of days between its end_date and the next subscription's start_date.

Expected output

  • Any row order

Example of the shape (made-up values):

user_id end_date next_start gap_days
31 2025-06-10 2025-08-22 73

Hints, the later steps and the answer come with Pro.

Write your query here. Ctrl + Enter submits.