Loading...

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
mid

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.

Practice This Problem

Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a live PostgreSQL database and grades it instantly.