Cost Share Within Category
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L4
Problem
The FinOps team is reviewing how spend breaks down inside each category, limited to compute, storage, and network. For every allocation in those categories, return its allocation ID, category, amount, and that amount's share of the category's total, ordered by category then allocation ID.
Summary
Each entry's slice of the category total.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.