Loading...

Bottom 2% Services by Spend

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

Domain
SQL
Difficulty
hard
Seniority
mid

Problem

FinOps is hunting for zombie services that cost almost nothing but still consume billing line items. Identify the bottom 2% of services by total cloud spend in May 2026 by bucketing them into 50 equal-sized percentile groups and returning those in the lowest bucket. Show the service name and total spend, from lowest up.

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.