Decision-ready business reports
Move beyond a correct query: define recurring revenue, measure activation, find unpaid balances, and reconcile billing mistakes before presenting a number.
Start course→ 02
→ 03
Your exercises
01The board wants contracted MRR at the start of 1 September 2026, not cash collected. An account contributes its plan's monthly price if it was created on or before that date and had not churned by that date. Starter is €49, growth €199, scale €799. Return one column named mrr. Do not use invoices: open payments and double-billing should not change this metric.
On 30 September 2026, finance needs a collections list. For each invoice whose status is 'open', return company, invoice_date, amount, and whole days outstanding as of 2026-09-30. Sort by days outstanding highest first, then company A to Z.
Billing found exact repeated paid invoices. For invoices dated in 2026 with status 'paid', define a repeated group as the same account_id, invoice_date and amount appearing more than once. Return one column named extra_paid_amount: the sum of amount for all copies beyond the first in each repeated group. This is a potential reconciliation amount, not automatically a refund.
Product wants to review accounts created in 2026. An account is activated if it created at least one report from its signup date through the next 29 days. Return company, created_at and a text label 'activated' or 'not activated'. Sort by company A to Z.
Customer success wants accounts that were still customers at the start of September 2026 but had no product event from 1 August through 30 September 2026. Return company, plan and sales_owner, sorted by company A to Z. This is a usage signal, not a churn prediction.
Leadership sees two different September numbers and needs them side by side. Return one row with contracted_mrr at the start of 1 September 2026 (active accounts × plan price, as in the MRR exercise) and september_paid_invoices (sum of paid invoice amounts dated in September 2026). Do not force the two values to agree.