Loading exercise…
Loading exercise…
Exercises are built for a keyboard. Read the task here, then open this page on a laptop to solve it.
The revenue expression. Revenue isn't stored in one column. Each order line earns quantity × unit_price × (1 − discount_pct): the price after its discount. Only completed orders count, which is why order lines are joined to orders to read the status. SUM then adds the line amounts into one total.
select round(sum(list_price * (1 - 0.10)), 2) as catalog_after_discount from products
Finance asked the AI assistant for Brightline's total completed revenue for 2025. Its number is higher than the figure in the finance report.
AI assistant: “I joined order lines to orders, kept the completed ones and summed quantity times unit price.”
Run the AI query, then fix it so it returns one number, revenue: the total of quantity × unit_price × (1 − discount_pct) over completed orders, rounded to 2 decimals.
Loading the Brightline dataset…
Language
Full plan
SQL ✓ · Excel and Power BI also included
Cancel anytime · 14-day full refund · Secure payment by Stripe