Cohort = month of a customer's first order. For each cohort cohort_month, return customers (in the cohort) and returned — how many of them ordered again in any later month.
8 rows with columns cohort_month, customers, returned — first 3 shown:
| # | |||
|---|---|---|---|
| 1 | 2024-01-01 00:00:00 | 3 | 3 |
| 2 | 2024-02-01 00:00:00 | 2 | 1 |
| 3 | 2024-03-01 00:00:00 | 2 | 2 |
Run your code to see the output here.