Loading exercise…
Loading exercise…
Exercises are built for a keyboard. Read the task here, then open this page on a laptop to solve it.
GROUP BY. GROUP BY makes one row per distinct value. Put that column in SELECT and in GROUP BY, then add an aggregate like COUNT(*) to summarise each group.
select segment, count(*) as customers from customers group by segment
The catalogue team wants to know how many products each category has.
Return one row per category with two columns: category and the number of products in it.
Loading the Brightline dataset…
Language
Full plan
SQL ✓ · Excel and Power BI also included
Cancel anytime · 14-day full refund · Secure payment by Stripe