A food delivery app calls an order immediate when the customer's preferred delivery date equals the order date, and scheduled otherwise. Look only at each customer's first order, meaning the order with their earliest order_date (no customer placed two orders on their first day). Write an SQL query that returns a single column, immediate_pct: the percentage of customers whose first order was immediate, rounded to 2 decimal places.
Loading…
Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.
Ask questions, share alternate queries, and explore solutions
Your recent query executions and answer checks
This will insert the verified MySQL solution into your editor so you can study how each clause transforms the table.