AdvancedAdvancedFree prompt

Complete Cohort Analysis: Retention, Revenue, and Product Behavior

Cohort analysis framework for digital products covering user retention, revenue per cohort, feature adoption, and high-value user profile identification.

Implement cohort analysis across three dimensions—usage retention, cumulative revenue, and feature adoption—to identify which customer cohorts are most valuable, what differentiates users who stay from those who churn, and where to focus product and marketing efforts.

At a glance

Access

Free prompt

Open to copy — no account or payment needed.

Prompt objective

Implement cohort analysis across three dimensions—usage retention, cumulative revenue, and feature adoption—to identify which customer cohorts are most valuable, what differentiates users who stay from those who churn, and where to focus product and marketing efforts.

Real use case

The personal finance app PoupaMoney, based in Austin, has 95,000 registered users but only 18% use the app in week two. The product team doesn't know if the problem is acquired user quality (poor acquisition channels) or product experience (broken onboarding)—and without cohorts, they can't answer.

Customize these fields first

PRODUCT NAMENUMBERPERIODPRODUCTe.g., first login, first transaction, account creatione.g., opens app, completes a transaction, generates a reportweek/monthACTIVATION_EVENT

Replace the placeholders with your own context before you run the prompt. That usually improves the first output more than adding more instructions later.

Prompt

Build a complete cohort analysis framework for [PRODUCT NAME], a digital product with [NUMBER] users and [PERIOD] of data.

**Core Definitions for [PRODUCT]:**
- Activation event (cohort start): [e.g., first login, first transaction, account creation]
- Retention event (measures active usage): [e.g., opens app, completes a transaction, generates a report]
- Cohort period: [week/month]
- Observation window: [NUMBER] periods

**Part 1 — Retention Matrix (Retention Cohort):**

SQL query to generate the matrix:
```sql
WITH first_events AS (
    SELECT
        user_id,
        DATE_TRUNC('month', MIN(event_date)) AS cohort_month
    FROM events
    WHERE event_type = '[ACTIVATION_EVENT]'
    GROUP BY user_id
),
monthly_activity AS (
    SELECT
        e.user_id,
        DATE_TRUNC('month', e.event_date) AS activity_month,
        p.cohort_month,
        DATEDIFF('month', p.cohort_month, DATE_TRUNC('month', e.event_date)) AS period
    FROM events e
    INNER JOIN first_events p USING (user_id)
    WHERE e.event_type = '[RETENTION_EVENT]'
)
SELECT
    cohort_month,
    COUNT(DISTINCT CASE WHEN period = 0 THEN user_id END) AS period_0,
    ROUND(COUNT(DISTINCT CASE WHEN period = 1 THEN user_id END) * 100.0 /
        NULLIF(COUNT(DISTINCT CASE WHEN period = 0 THEN user_id END), 0), 1) AS retention_1,
    -- Repeat for periods 2 to 12
FROM monthly_activity
GROUP BY cohort_month
ORDER BY cohort_month;
```

**Matrix Interpretation:**
- Row (horizontal): cohort retention over time → measures product lifecycle quality
- Column (vertical): retention of different cohorts in the same period → measures product improvement
- Diagonal: retention in the period immediately after each cohort's activation

**Part 2 — Revenue Cohort (how much each cohort generates over time):**
```sql
SELECT
    cohort_month,
    SUM(CASE WHEN period = 0 THEN revenue END) AS revenue_month_0,
    SUM(CASE WHEN period = 1 THEN revenue END) AS revenue_month_1,
    -- ... through period 12
    SUM(revenue) AS cumulative_ltv
FROM revenue_per_user
INNER JOIN first_events USING (user_id)
GROUP BY cohort_month;
```

- Calculate payback period per cohort (when average CAC is recovered)
- Project 24-month LTV using decay curve
- Identify 

Open directly in an AI — the text is pre-filled:

How to use this prompt

  1. 1Replace the key placeholders first: PRODUCT NAME, NUMBER, PERIOD, PRODUCT.
  2. 2Replace any bracketed placeholders like [this] with your own context.
  3. 3Add extra background information when you want more tailored results.
  4. 4Combine multiple prompts in one conversation when you need a richer output.
  5. 5Save your best-performing prompts so they are easy to reuse later.

Next best step

Open the guide first, then branch only if you still need more.

A guide for technical builders choosing between prompts, coding workflows, and agent-based implementation.

If this prompt is close but not quite right, generate variants next. If the job is recurring, move into the course library after the guide.

Related prompts

View all

Advanced Financial Analysis DAX Formulas in Power BI

An evidence table with finding, source, limitation, impact hypothesis, action and validation. Includes required inputs, evidence checks and a concrete next step.

AdvancedFree prompt

Best for

Complete “Advanced Financial Analysis DAX Formulas in Power BI” with an evidence table with finding, source, limitation, impact hypothesis, action and validation that can be checked against the supplied evidence.

Copy-ready promptOpen prompt

Predictive Analysis with Python: Regression and Demand Forecasting

An evidence table with finding, source, limitation, impact hypothesis, action and validation. Includes required inputs, evidence checks and a concrete next step.

AdvancedFree prompt

Best for

Complete “Predictive Analysis with Python: Regression and Demand Forecasting” with an evidence table with finding, source, limitation, impact hypothesis, action and validation that can be checked against the supplied evidence.

Copy-ready promptOpen prompt

Multichannel Marketing Data Correlation with Revenue Attribution

An analysis or query/formula plan with definitions, checks, findings, limitations and decision implications. Includes required inputs, evidence checks and a concrete next step.

AdvancedFree prompt

Best for

Complete “Multichannel Marketing Data Correlation with Revenue Attribution” with an analysis or query/formula plan with definitions, checks, findings, limitations and decision implications that can be checked against the supplied evidence.

Copy-ready promptOpen prompt

LTV Calculation for SaaS: Models, Segmentation, and Growth Impact

An analysis or query/formula plan with definitions, checks, findings, limitations and decision implications. Includes required inputs, evidence checks and a concrete next step.

AdvancedFree prompt

Best for

Complete “LTV Calculation for SaaS: Models, Segmentation, and Growth Impact” with an analysis or query/formula plan with definitions, checks, findings, limitations and decision implications that can be checked against the supplied evidence.

Copy-ready promptOpen prompt

Explore other prompt categories

Move sideways into adjacent libraries when the current category is not the full answer.

Every prompt here is free. The course teaches the thinking behind them.

Copy as many prompts as you like. When you want to move from single prompts to a repeatable AI workflow, Learn AI in 30 Days walks through it, one day at a time.

Get the courseSee the 30-day curriculum first

Buy the course once ($20), or choose $10/month or $100 lifetime access.

Help & support