Lesson 14 of 14 · 32 min
Customer retention and churn
By the end of this lesson you can compute repeat-purchase rates, build a retention curve that only uses cohorts old enough to be observed, and calculate monthly churn from subscription periods.
The cohort table from the previous lesson is the raw material. Retention reporting turns it into a few numbers people can act on. Each needs a precise definition of three things:
- Who is in the denominator: which customers could have been retained at that point?
- What counts as retained: any login, a purchase, a paid subscription on a given date?
- When: within 90 days, in month 6, on the first day of next month?
Write these down before writing SQL; most retention disputes are definition disputes.
This lesson, its 4 graded exercises and every other Members lesson in SQL Quest come with a Formula Quest membership that includes SQL (Single Quest with SQL selected, Quest Trio including SQL, or Quest Unlimited), or with SQL access from your organization.
Free to everyone: all of SQL Foundations and Retrieving and Filtering Data, the first lesson of every track, the playground, the dataset library and the SQL reference. See free lessons