Quarterly Consolidated Cloud Costs
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L4
Problem
Finance weights each cloud service's raw cost by its matching allocation amount from cost_allocs. For Q1 and Q2 of 2026, compute the total weighted spend per quarter. Return the quarter label (Q1/Q2) and total converted spend.
Summary
Quarterly cloud spend, weighted.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.