Your question is Budget vs Actual Variance Report. Start with the requirements and the one table on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
FinSight tracks department spending in a single budgeting table. Write a SQL query to report departments where actual spending differs from projected budget.
department with its total projected budget, total actual spend, and the variance (actual_spend - projected_budget).status column that shows Over Budget when actual spend is greater than projected budget, otherwise Under Budget.| Column | Type | Description |
|---|---|---|
| idPK | INT | Primary key for each budget record |
| department | VARCHAR(100) | Department name |
| projected_budget | DECIMAL(12,2) | Projected budget amount for the record |
| actual_spend | DECIMAL(12,2) | Actual expenditure amount for the record |
| report_month | DATE | Reporting month for the budget entry |
| cost_center | VARCHAR(50) | Cost center associated with the record |