How to calculate Customer Concentration Ratio
Customer concentration ratio is the share of revenue that comes from your largest few customers.
Formula
Concentration ratio = revenue from the top N customers ÷ total revenueSQL query
This example assumes: orders(id, customer_id, order_date date, total_amount numeric). It is written in PostgreSQL syntax; date functions differ slightly in MySQL, BigQuery and SQLite, and your column names will differ from these.
WITH by_customer AS (
SELECT customer_id, SUM(total_amount) AS revenue
FROM orders
WHERE order_date >= CURRENT_DATE - INTERVAL '12 months'
GROUP BY customer_id
),
ranked AS (
SELECT revenue, ROW_NUMBER() OVER (ORDER BY revenue DESC) AS rn
FROM by_customer
)
SELECT SUM(revenue) FILTER (WHERE rn <= 10) / NULLIF(SUM(revenue), 0) AS top_10_share
FROM ranked;Common mistakes that make Customer Concentration Ratio wrong
- Subsidiaries of one parent group count as separate customers unless you map them to the parent.
- The share depends on N and on the window; state both when you quote it.
- Credit notes and refunds can push a customer's net revenue below its invoiced revenue.
Ask for Customer Concentration Ratio in plain English
Instead of writing the query yourself, you can type the question. SchemaChat turns it into SQL against your connected database or uploaded file, runs it, and shows the SQL and the figures it used so you can check the answer before you share it. It does not replace your judgement about the definition: check that the query matches the formula your business uses.
- What share of the last 12 months of revenue came from our top 10 customers?
- Which customers make up the top 5 by revenue?