Skip to content

Glossary

In tasks on subscription data, many wrong answers come from a word, not from SQL or Python. What are proceeds? When does a subscription churn? Does a debt have a date window? Each term below has a short meaning and the place where it lives in the practice dataset. Read the English terms out loud before the interview: they are the words the interviewer will use.

The practice data is an invented subscription marketplace: merchants sell subscriptions to customers through four sales channels.

TermWhat it meansIn the practice data
merchantA business that sells subscriptions on the platformmerchants: mer_01 … mer_12
productOne subscription that a merchant sellsproducts: prd_01 … prd_20, linked by merchant_id
planA product with a billing period: weekly, monthly or annualplan_id such as prd_03.monthly; plan_period is P1W, P1M or P1Y
customerA person who buys a subscriptioncustomer_id such as cus_02564
sales channelWhere the customer paidchannel: north_market, south_market, web or promo
partner marketplaceA third party that sells for the merchant: it collects the money, keeps a fee and pays the merchant laterNorth Market (north_market) and South Market (south_market)
web checkoutThe merchant’s own payment pagechannel = 'web', with a card processing fee
promo accessFree access that the merchant grants to a customerchannel = 'promo', price 0

Say: “One row of transactions is one billing period of one customer’s subscription, sold through one channel.”

TermWhat it meansIn the practice data
gross revenueWhat the customer paidcharged_usd
net revenueRevenue after refundsrevenue_usd, which is 0 for a refunded transaction
fee rateThe share of the price that the channel keepsfee_rate: 0.15 or 0.30 on the marketplaces, 0.03 on web checkout, 0 for promo
proceeds of a saleWhat reaches the merchant: the price minus the fee; 0 once refundedrevenue_usd * (1 - fee_rate)
proceeds of a monthWhat a marketplace owes a merchant for one month (reconciliation, advances)Each sale adds charged_usd * (1 - fee_rate) in the month of start_time; each refund subtracts the same amount in the month of refunded_at
payoutA transfer from a marketplace to the merchant, once a month, for one month of saleschannel_payouts; North Market pays about 32 days after the month ends, South Market about 14
refundMoney returned to the customer, days or weeks after the purchaserefunded_at; in the practice data, a median of about 11 days after the start and 21 days at most
test purchaseA purchase made to test the integration, not real moneyis_test: exclude it from every business number

Say: “Proceeds are what the merchant actually receives: the price minus the channel’s fee. For one month, I add the sales of that month and subtract the refunds of that month.”

TermWhat it meansIn the practice data
transactionOne billing period of a subscription, paid or trialA row of transactions, the period [start_time, end_time)
subscription, chainEvery period of one subscription: the first purchase and its renewalsThe same original_transaction_id
renewalThe next period of the same subscriptionThe next row of the chain, renewal_number 2, 3, …
trialA free first periodis_trial; 7 days, price 0
trial conversionThe first paid period right after a trialis_trial_conversion
conversion rateConverted trials divided by all trialsRecent trials have not had time to convert yet
active at moment mm is inside the period, and the subscription was not refunded by thenstart_time <= m AND end_time > m AND (refunded_at IS NULL OR refunded_at > m)
paidNot a trial, not a test purchase, not promo accessThe three filters together
churnA subscription was active at the start of the period and is not active at its end: nobody renewed itFor August: active on 1 August, and last_end <= '2026-09-01', where last_end is MAX(end_time) of the chain: not active on 1 September at 00:00
churn rateChurned subscriptions divided by those active at the start of the periodActive on the first day is the denominator
MRRMonthly recurring revenue: the monthly value of every subscription active nowBy plan_period: annual price / 12, weekly price × 52 / 12, monthly as is
ARPPUAverage revenue per paying user: revenue divided by the number of distinct paying customersNet revenue / COUNT(DISTINCT customer_id) of paid transactions
maturationA number that is still changing, because refunds and conversions have not arrived yetThe most recent month looks better than it will be

Say: “A subscription is a chain of transactions with the same original transaction id. It churned in August if it was active on the first of August and is not active on the first of September at midnight.”

TermWhat it meansIn the practice data
webhookA message from a sales channel: “something happened”webhook_events; type is purchase, renewal, expiration or refund
at-least-once deliveryThe sender retries until it is sure, so one event can arrive more than onceThe same event_id in several rows
duplicateA repeated delivery of the same eventSame event_id, type and occurred_at; only received_at differs
idempotencyProcessing the same event again changes nothingA unique key plus ON CONFLICT DO NOTHING
occurred_at, received_atWhen it happened, and when it reached the platformThe difference is the delivery delay

Say: “Webhooks are delivered at least once, so I’d store them with a unique constraint on event_id and ignore the repeats.”

The platform pays a merchant early: up to 70% of the proceeds a marketplace will pay out later, for a 3% fee. When the marketplace payout arrives, it repays the advance.

TermWhat it meansIn the practice data
advanceMoney paid to a merchant now, against a marketplace payout that has not arrived yetadvances; by the rules, at most 70% of the expected proceeds; an advance entry (+) in the ledger
principalThe advance itself: the money that was paid outadvances.amount_usd
feeWhat the platform charges for the advancefee_usd, 3% of the amount; a fee entry (+)
repaymentPaying the debt back out of a marketplace payoutA repayment entry (−)
ledgerA journal of money movements; entries are only added, never changedledger_entries
outstanding, owedWhat the merchant owes right now: the sum of every ledger entry over all timeSUM(amount_usd)
enrolledThe merchant has joined the advances programmerchants.advances_enrolled_at IS NOT NULL; six of the twelve merchants
headroom, available to advanceHow much more can be advanced: the limit minus the debtFor example, 70% of the last 30 days of proceeds minus what is owed; negative means over the limit
allocationA piece of a payout sent to one part of a debt(advance_id, 'fee' or 'principal', amount)
remainingWhat is left of a payout after repayment; it goes to the merchantNever below 0
idempotency keyThe key that recognises a repeat of the same operationpayout_id; advances.idempotency_key is merchant:channel:month, such as mer_11:north_market:2026-07-01
reconciliationComparing what should have been paid with what arrivedExpected proceeds, or advances, against channel_payouts, per channel and month

Say: “An advance is money paid to a merchant today against their next marketplace payout. When the payout arrives, it repays the fee first, then the principal, oldest advance first.”

This one difference decides many money tasks.

  • A flow is a sum over a period: revenue for 30 days, sales in August. It always has a date window.
  • A balance is a state at a moment: a debt, an account balance, the active subscriptions. It is computed over all time up to that moment, with no window.

Say: “Proceeds are a flow, so they get the 30-day filter. The debt is a balance, so I sum the whole ledger.”

Site content: CC BY 4.0. Code: MIT. The exercises run in your browser: PostgreSQL by PGlite, Python by Pyodide.