DataDriven
LearnPracticeInterviewDiscussDailyJobs

Top Cost Categories

A medium SQL mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.

Domain
SQL
Difficulty
medium
Seniority
L3

Interview Prompt

Categories are tracked in the budget allocation system (cost_allocs), but actual billing amounts live in the cost tracking system (cloud_costs). Attribute each cloud charge to its budget category by matching the allocation for the same service, region, and billing month (cloud_costs.bill_date's year-month equals cost_allocs.period). A (service, region) pair alone maps to several categories across months, so the month is required to make the attribution unambiguous; a service can also appear under several teams in the same period, so collapse (service, region, month) to one category before summing or each charge is counted multiple times. Show the top 3 categories by total attributed amount.

Summary

Three categories eating the budget.

How This Interview Works

  1. Read the vague prompt (just like a real interview)
  2. Ask clarifying questions to the AI interviewer
  3. Write your sql solution with real code execution
  4. Get instant feedback and a hire/no-hire decision

Related

  • All Mock Interviews
  • Practice Mode (untimed)
  • SQL Interview Questions
  • Data Engineering Interview Prep Guide
  • Practice Problems
  • Daily Challenge