How to calculate Discount Rate (Sales)
Discount rate is the share of potential sales value given away through price reductions.
Formula
Discount rate = total discount value ÷ gross sales value before discount × 100SQL query
This example assumes: order_items(order_id, product_id, quantity, unit_price, discount_amount). It is written in PostgreSQL syntax; date functions differ slightly in MySQL, BigQuery and SQLite, and your column names will differ from these.
SELECT DATE_TRUNC('month', o.ordered_at) AS month,
SUM(i.discount_amount) * 100.0
/ NULLIF(SUM(i.quantity * i.unit_price), 0) AS discount_pct
FROM order_items i
JOIN orders o ON o.id = i.order_id
WHERE o.status = 'paid'
GROUP BY 1
ORDER BY 1;Common mistakes that make Discount Rate (Sales) wrong
- Order-level discounts (a coupon on the whole basket) may need allocating across lines.
- Do not confuse this with the financial 'discount rate' used in valuation.
- Sales promotions concentrate in a few weeks; monthly averages hide that.
Ask for Discount Rate (Sales) 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 gross sales was discounted each month?
- Which products are discounted most often?