Provider Spend Variance Between Halves
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L4
Problem
Compare cloud spend between the first half (Jan through Jun) and second half (Jul through Dec) of 2026. For each provider, compute the total amount in each half, then show the difference (second half minus first half). Rank providers from biggest increase to smallest. Return the provider and amount difference.
Summary
Two time windows. Did the cloud bill go up or down?
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.