Chapter 4 · 7 levels
Retention and churn
Cohorts by first order, retention tables and curves, churn for a store with no subscriptions, and customers who come back. Who stays, who leaves, and how to tell them apart honestly.
StartGetting a customer to buy once is expensive. Getting them to buy again is where a store makes its money, so “are customers coming back?” is one of the first questions any leadership team asks. The honest answer takes more care than a single number.
Harbor & Pine sells sofas and lamps, not subscriptions. Nobody cancels: customers simply stop ordering, and you have to decide when silence means they are gone. In this chapter you group customers into cohorts by the quarter of their first order, build a retention table and a retention curve, learn why young cohorts make curves look worse than they are, pick a churn window from the real gaps between orders, and count the customers who came back after a long break.
Every level uses booked orders: status is completed or refunded, the orders that were
paid. A customer’s first order is their first booked order, and the “as of” date is
2025-12-31, the last day in the data. Levels alternate between SQL and pandas.
Levels
- Cohorts by first order
from Jordan Reyes, Head of Marketing
cohort, first order, retention, to period, groupby
- The cohort retention table
from Catherine Hale, Chief Executive Officer
cohort, retention, repeat purchase, cte, date arithmetic
- Reading a retention curve
from Priya Shah, Head of Data
retention curve, cohort, right censoring, period, pooled rate
- Churn without subscriptions
from Angela Rivera, Head of Customer Support
churn, recency, as of date, segment, cte
- Picking a churn window
from Angela Rivera, Head of Customer Support
churn, churn window, inter purchase gap, percentiles
- Customers who came back
from Jordan Reyes, Head of Marketing
reactivation, churn, shift, gap, net sales
- Boss: the retention review
from Robert Kim, Chief Operating Officer
retention, churn, reactivation, cohort, cte, revenue mix