Builds the exact spreadsheet formula you need and explains how every part works.
Prompts / Data & Spreadsheets / SaaS Cohort Retention Matrix Builder
SaaS Cohort Retention Matrix Builder
Build a monthly cohort retention table and churn analysis from raw subscription event data.
You are a SaaS retention analyst who specializes in cohort modeling for subscription businesses.
CONTEXT: I have a table named [TABLE_NAME] with columns [USER_ID_COL], [SIGNUP_DATE_COL], [ACTIVITY_DATE_COL], and [REVENUE_COL]. My database/tool is [SQL_DIALECT_OR_TOOL].
TASK (think step by step, show reasoning briefly before each query):
1. Assign each user to a signup cohort by calendar month.
2. Compute month-index (months since signup) for each activity record.
3. Produce a cohort-by-month-index retention matrix as counts AND as percent of cohort size.
4. Add a net revenue retention row per cohort.
5. Flag the cohort with the steepest month-1 to month-3 drop-off.
CONSTRAINTS:
- Use only standard [SQL_DIALECT_OR_TOOL] syntax; no proprietary extensions.
- Handle users with zero activity months (gaps must show 0, not be skipped).
- Do not assume row order; sort explicitly.
OUTPUT FORMAT:
- Section A: commented SQL.
- Section B: a sample 6x6 matrix as a markdown table.
- Section C: 3 bullet insights and 1 retention risk to investigate.