B2B software company
A team-chat product sold per seat to companies. Accounts, plan subscriptions and monthly invoices, 2024 to mid-2025.
accounts
One row per customer company. Key: account_id. 110 rows in the larger version, 55 in the smaller.
| account_id | int | Unique id. |
| company | text | Company name. |
| industry | text | Retail, Finance, Education, Media, Logistics, Software or Manufacturing. |
| country | text | Two-letter country code. |
| created_on | date | Day the account was created. |
| account_manager | text, nullable | Name of the owner on our side. NULL when unassigned. |
plans
Price list. Key: plan_id. 4 rows in the larger version, 4 in the smaller.
| plan_id | text | starter, team, business or enterprise. |
| plan_name | text | Display name. |
| seat_price | numeric(10,2) | Monthly price per seat, USD. |
subscriptions
One row per stretch of time an account spent on one plan. A plan change ends one row and starts another on the same day. Key: subscription_id. 149 rows in the larger version, 82 in the smaller.
| subscription_id | int | Unique id. |
| account_id | int | The account. |
| plan_id | text | The plan. |
| seats | int | Seats paid for. |
| started_on | date | First day on this plan. |
| ended_on | date, nullable | Day it stopped (not included). NULL while active. |
invoices
One invoice per account per month while subscribed. Key: invoice_id. 1,090 rows in the larger version, 605 in the smaller.
| invoice_id | int | Unique id. |
| account_id | int | The account billed. |
| issued_on | date | Issue day. |
| due_on | date | Payment due day. |
| amount | numeric(10,2) | Amount billed, USD. |
| paid_on | date, nullable | Day it was paid. NULL if unpaid. |
Questions on this database
- Billed, paid and outstanding by industryFinance wants a receivables summary by customer industry, using every invoice in invoices.
- Accounts with a high average invoiceThe revenue team wants a shortlist of big-ticket accounts. Use every invoice in invoices, paid or not.
- Overdue invoices by account managerCollections wants an overdue list by account owner. Today is 2025-06-30 for this report.
- Plan stretches and billing for accounts that changed planCustomer success is reviewing accounts that moved between plans.
- Recurring revenue by plan on a given dayFinance asks what the subscription book looked like on 15 March 2025.
- Invoiced amount by the plan active on the issue dateInvoices do not store a plan. To attribute revenue to plans, link each invoice to the subscription its account had on the invoice's issued_on day.
- Invoices where the amount changedFinance wants to review every price change. Find each invoice whose amount is different from the same account's previous invoice.
- The invoice that takes an account past 5,000 billedSales ops wants to know when each account became a "5,000 customer": the first invoice that brings its lifetime billing to 5,000 or more.
- Months billed above the monthly averageFinance wants to flag the strong billing months.
- On-time payment rate by industryFinance wants to know which industries pay on time. An invoice was paid on time when paid_on is on or before due_on.
- Revenue per account, including non-payersLeadership wants the average collected revenue per account for each industry.
- Active subscriptions by seat band and planSales ops wants a grid of live subscriptions on 30 June 2025: seat bands down the side, plans across the top.
- On-time, late and unpaid invoices by monthCollections wants to see how each month's invoices were settled.
- Overdue invoices as of a fixed dateCollections reviews the books as they stood at the end of 2025-05-31.
- Subscriptions active on a given dateFinance asks for a snapshot of paying seats on 2025-03-15. A subscription is active on a date when it started on or before that date and has not ended by then.
- Seats on the last day of each monthFinance reports month-end paying seats.
- Invoices issued, paid and unpaid by industryCollections wants a quick count per industry. An invoice is paid when paid_on is not NULL and unpaid when it is NULL.
- Quarter-over-quarter invoiced revenueThe CFO reviews invoicing one quarter at a time. Calendar quarters start on 1 January, 1 April, 1 July and 1 October.
- Month-over-month change in invoicingFinance tracks the month-over-month change in invoiced amount.
- New and churned seats by monthFinance splits each month's movement in customers into new and churned. Take a snapshot of every account on the first day of each month.
- Accounts billed since May with no paid invoiceThe collections team wants the accounts that were billed recently and have paid nothing of it.
- Month-over-month net revenue retentionFinance tracks net revenue retention (NRR): how much of last month's revenue is still there this month, counting upgrades, downgrades and cancellations...
- Monthly subscription churn rateThe finance team reports monthly logo churn: of the accounts that were paying at the start of a month, how many had stopped by the start of the next one?
- Merge subscription rows into continuous customer stretchessubscriptions has one row per plan period, and a plan change creates a new row.
- Active accounts and seats per day from subscription datesThe finance dashboard shows, for each day, how many accounts had an active subscription and how many seats they paid for.
- Monthly recurring revenue by plan with empty monthsFinance reports monthly recurring revenue (MRR) as a snapshot on the first day of each month.
- Reconcile active subscriptions against February invoicesBilling wants to check that every account that should have been invoiced in February 2025 was, and that nobody was invoiced without a subscription.