Loading...

Over-Budget Services

A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.

Domain
SQL
Difficulty
medium
Seniority
mid, senior

Problem

Combine budget allocations with actual cloud charges for each service during the same billing period, and pull in any related batch job records. Prorate each service's cost by multiplying allocated amount by actual cloud cost and dividing by hours in a year. Show service name and total prorated cost for services with positive prorated cost, ranked highest first.

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.