Weekly challenge
Who brought in the most money in October?
Raket Parts B.V. sells rocket parts to universities, industrial customers and rocket builders. Look at its invoices for October 2025. Which customer segment brought in the most invoiced sales?
Pick your answer
What the data shows
| Segment | Customers | Invoices | Sales |
|---|---|---|---|
| Rocket builders | 6 | 466 | €5,740,816.23 |
| Universities | 236 | 652 | €1,365,739.85 |
| Industrial customers | 82 | 270 | €472,913.40 |
Universities sent the most invoices (652) and are the most customers, but the 6 rocket builders brought in most of the money. Counting rows and adding up amounts can tell different stories, so check which one the question asks for.
See the SQL that answers it
SELECT c.segment,
COUNT(*) AS invoices,
ROUND(SUM(i.net_amount), 2) AS sales
FROM customer_invoices AS i
JOIN customers AS c ON c.customer_ref = i.customer_ref
WHERE i.invoice_date BETWEEN '2025-10-01' AND '2025-10-31'
GROUP BY c.segment
ORDER BY sales DESC;A new challenge arrives on Monday 9th November.
Work it out yourself
Run SQL on the Raket Parts tables in your browser, then pick your answer.
Two tables: customer_invoices (invoice_ref, customer_ref, invoice_date, net_amount) and customers (customer_ref, segment, country). A starting query is ready. Change it, then run it.
