June delivery check

EasyInstacartfilterconditional averagesdifferent denominatorsjoins· 20 XP (10 per step)

Mock interview. You're interviewing for a data analyst job on a grocery delivery team. The interviewer shares the orders and stores tables. "Let's warm up with how June went."

An order is on time when delivered_at <= promised_by. Cancelled orders have no delivery time.

Step 1: The headline numbers

"Give me June 2026 in one row: orders placed, the share cancelled, the average basket (subtotal) of delivered orders, and the on-time rate of delivered orders."

Expected output

  • One row; cancel_rate and on_time_rate as percentages rounded to 1 decimal; avg_basket rounded to 2 decimals

Example of the shape (made-up values):

orders cancel_rate avg_basket on_time_rate
700 4.0 40.00 85.0

Hints, the later steps and the answer come with Pro.

Step 1 of 2

Write your query here. Ctrl + Enter submits.