Loading exercise…
Loading exercise…
Exercises are built for a keyboard. Read the task here, then open this page on a laptop to solve it.
SUM, MIN and MAX. SUM adds up a column, MIN finds its smallest value and MAX its largest. Like COUNT and AVG, each one squeezes many rows into one value, and you can put several of them in the same SELECT, separated by commas.
select min(list_price) as cheapest, max(list_price) as priciest, sum(unit_cost) as total_cost from products
The warehouse is resizing the Paper Towels (24) shelf and wants to know how many units were ordered this year and how big a single order line can get.
For product_id 303, using every row of order_items whatever the order status, return three columns: total_units (sum of quantity), smallest_line (the lowest quantity) and largest_line (the highest quantity).
Loading the Brightline dataset…
Language
Full plan
SQL ✓ · Excel and Power BI also included
Cancel anytime · 14-day full refund · Secure payment by Stripe