Intermediate Case 30 of 50

Case 030: Signup Cohorts

customers

The growth team wants to see ByteMart's customer base by when people joined — the kind of question Alex would've had no idea where to start on a month ago. The manager passes along the request.

"Could you group everyone by the month they signed up? I'd like to see the cohort sizes."

The data Alex is looking at

customers
idnamecountrysignup_date
1SamGermany2026-01-02
2NinaCanada2026-01-05
3DavidGermany2026-01-10
4MayaJapan2026-01-15
5DanielCanada2026-01-20
… 5 more rows
TASK

Help Alex answer the manager:

“Show how many customers signed up in each calendar month.”
SQL editor Ctrl+Enter to run
Write a query above and hit Run to see what comes back.
No hints requested yet — click "Get a hint" when you're stuck.
Alex's final query — this is for reference. Copy it into your own thinking, not into the editor above.
SELECT DATE_FORMAT(signup_date, '%Y-%m') AS cohort_month, COUNT(*) AS customers FROM customers GROUP BY cohort_month ORDER BY cohort_month;
What that query returns
Case Debrief Cohort grouping by signup period
  • A "cohort" is just a group of customers who share a starting point in time — grouping by a formatted signup date is how cohort analysis begins.

Case closed.

Ready for the next one?

Next: Case 031 — Did They Come Back? →