Same database, different churn: agree on the metric before asking AI
“What was churn?” is not yet a complete database question. A correct SQL statement can answer a different question from the one your team intended.
MotherDuck's One Definition for Every Metric describes shared metric definitions used across Claude questions and dashboards. The conversation streamed October 15; its archive was uploaded October 16 in New York time. We reviewed its description and chapters; the transcript did not load. The dashboards use demo data, according to the description. We did not reproduce its implementation.
One cohort, two different answers
Consider these fictional monthly recurring revenue snapshots, in one currency. Each customer has one row per snapshot; multiple subscriptions have already been consolidated. This example compares September 1 and October 1, 2026 at 00:00 UTC. Zero at closing explicitly means the opening customer has no recurring revenue left; an absent row means incomplete evidence, not an assumed cancellation.
| Customer | Opening MRR | Closing MRR |
|---|---|---|
| A | $100 | $0 |
| B | $900 | $1,000 |
| C | $500 | $400 |
| D | $500 | $500 |
| E (new) | Outside opening cohort | $300 |
Our customer churn definition is opening customers whose closing MRR is zero, divided by opening customers: one out of four, or 25%. Our gross MRR churn definition includes all MRR lost by opening customers through cancellation or contraction, divided by opening MRR. A loses $100 and C loses $100: $200 out of $2,000, or 10%. B's expansion does not offset gross losses. E is outside both calculations.
These are our explicit example definitions, not universal accounting rules. Gross MRR churn is different from net revenue retention, cancelled-customer MRR alone, or churn measured by cancellation-event timestamps. Ending total MRR rises to $2,200 after new business, while both churn measures remain positive.
Give the agent a metric contract
Specify the metric name, snapshot instants, customer grain, currency, opening cohort, numerator, denominator, treatment of contraction and expansion, and data completeness rule. Confirm that every opening customer has an explicit closing snapshot before running this query. Otherwise this inner join silently drops missing customers. For an empty cohort the percentage is unknown, represented by NULL.
WITH cohort AS (
SELECT o.customer, o.mrr_cents AS start_mrr, c.mrr_cents AS end_mrr
FROM opening o JOIN closing c ON c.customer = o.customer
)
SELECT COUNT(*) AS opening_customers,
SUM(CASE WHEN end_mrr = 0 THEN 1 ELSE 0 END) AS cancelled_customers,
SUM(start_mrr) AS opening_mrr_cents,
SUM(CASE WHEN end_mrr < start_mrr THEN start_mrr-end_mrr ELSE 0 END) AS lost_mrr_cents,
100.0 * SUM(CASE WHEN end_mrr=0 THEN 1 ELSE 0 END)
/ NULLIF(COUNT(*),0) AS customer_churn_pct,
100.0 * SUM(CASE WHEN end_mrr < start_mrr THEN start_mrr-end_mrr ELSE 0 END)
/ NULLIF(SUM(start_mrr),0) AS gross_mrr_churn_pct
FROM cohort;
Check the answer against known data
The accompanying fixture and verification script run offline with Python's SQLite library. They check the complete opening cohort, exclusion of the new customer, exact 25% and 10% results, closing total, and rejection of a write after enabling SQLite query-only mode. This tests the authored SQL and fixture, not an AI-generated answer or Bufflehead's UI/MCP path. No production subscription data or live model was used.
Where Bufflehead fits
Bufflehead provides a native, read-only bridge from AI tools to existing structured data. It helps the tool query the rows; your team still owns the metric definition and the decision about which data is complete. Supply the agreed definition with the question and inspect the resulting SQL. MotherDuck's ingestion pipelines, Guides and dashboard features are separate from Bufflehead, and this article does not imply an endorsement.