Atterna
RUEN
Get access

Cohort

A group of users who share a starting event in the same period, for example everyone whose first purchase was in September. Cohort analysis follows each group over time.

Formulacohort = everyone whose first [event] fell in the same period

How we work it through

  1. 1

    Define the starting event: registration or first paid order.

  2. 2

    Check where the data begins: the first cohort collects everyone who bought before it.

  3. 3

    Compare cohorts at the same age.

On the practice dataset

The query we run on Meridian, Atterna’s practice marketplace, and what it returns.

SELECT date_trunc('week', first_paid) AS cohort, COUNT(*)
FROM (SELECT buyer_id, MIN(created_at) AS first_paid
      FROM meridian.orders WHERE status = 'paid'
      GROUP BY buyer_id)
GROUP BY 1 ORDER BY 1;

Result1,710 · 1,297 · 494 · 151 — the first week is big because the data starts there, the last has one night

The common trap

Mixing cohorts of different ages in one average, which makes a stable product look like it is declining.

When an AI answers

An AI assistant

“New customers fell from 1,710 to 494 a week.”

What it didn’t know
It did not know the extract starts on 31 August, so “first order” means “first order we can see”.
Ask back
“When does the data start, and is the first cohort really new customers?”
Paste a real AI answer into the checker — it writes these questions for you →

Read next

Examples use Meridian, Atterna’s fictional practice marketplace.