Write SQL to join two or more tables and aggregate results by a key.
Use the supplied program and service request tables. Include programs without matching requests, exclude requests that do not match a program, and treat missing costs as zero in the total.
program_id ascending.program_id, program_name, request_count, resolved_request_count, and total_estimated_cost.| Column | Type | Description |
|---|---|---|
| program_idPK | INT | Unique program identifier |
| program_name | VARCHAR(120) | Program name |
| region | VARCHAR(40) | Program operating region |
| Column | Type | Description |
|---|---|---|
| request_idPK | INT | Unique service request identifier |
| program_id | INT | Referenced program identifier |
| status | VARCHAR(30) | Current request status |
| estimated_cost | DECIMAL(12,2) | Estimated cost associated with the request |