DataDriven
LearnPracticeInterviewDiscussDailyJobs

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.

Related

  • All Practice Problems
  • Mock Interview Mode
  • Data Engineering Interview Prep Guide
  • Daily Challenge
  • Data Engineering Lessons