Your question is Summarize Budget Lines by Program. 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.
Write a PostgreSQL query against voa_budget_lines to show total 2024 budget amount by program_name. Exclude rows where program_name is NULL or an empty string, and sort by total amount descending, then program name ascending.
| Column | Type | Description |
|---|---|---|
| budget_line_id | INT | Unique budget line identifier |
| program_name | VARCHAR(100) | Program tied to the budget line |
| fiscal_year | INT | Fiscal year of the budget entry |
| amount | DECIMAL(12,2) | Budgeted amount |
| fund_code | VARCHAR(20) | Funding source code |