Counted Twice
A easy AI Coding interview practice problem on DataDriven. Write and execute real ai coding code with instant grading.
- Domain
- AI Coding
- Difficulty
- easy
- Seniority
- L4
Problem
Restaurant partners are seeing ~12% inflated revenue in our partner-ping job. The job builds daily_restaurant_revenue from the orders + dropoffs tables. Run tests/test_no_double_count.py to reproduce: rows where one order has multiple dropoffs (multi-stop deliveries) get counted once per dropoff. Fix the SQL in queries/daily_restaurant_revenue.sql so revenue is per order, not per (order, dropoff).
Summary
Twice the revenue, half the truth.
Practice This Problem
Solve this AI Coding problem with real code execution. DataDriven runs your solution and grades it automatically.