Loading exercise…
Loading exercise…
Exercises are built for a keyboard. Read the task here, then open this page on a laptop to solve it.
Each regional manager sends a thank-you gift to their top 3 customers by completed orders, and anyone tied for a place gets one too. The AI's list has exactly three names per region, and Marcus Hill says one of his tied customers is missing.
AI assistant: “I counted completed orders per customer, numbered the customers in each region from the most orders down, and kept the first three.”
Run the AI query, then fix it so it returns region, customer_name and orders (completed orders) for every customer in their region's top 3, ties included: a customer qualifies when fewer than 3 customers in the same region have more completed orders.
Loading the Brightline dataset…
Language
Full plan
SQL ✓ · Excel and Power BI also included
Cancel anytime · 14-day full refund · Secure payment by Stripe