Your question is Summarize Operations Issues by Source. Start with the requirements and the three tables 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.
Acme Manufacturing tracks operational issues by source system. Write a PostgreSQL query to summarize issue volume and resolution speed for sources that currently have at least one open issue.
source_name.open_issue_count.high_open_issue_count.avg_resolution_days, rounded to 1 decimal place.open_issue_count descending, then source_name ascending.| Column | Type | Description |
|---|---|---|
| issue_idPK | INT | Primary key for each issue |
| source_id | INT | Foreign key to the issue source |
| severity | VARCHAR(20) | Severity label such as low, medium, or high |
| status | VARCHAR(20) | Issue status such as open or closed |
| created_at | DATE | Date the issue was created |
| resolved_at | DATE | Date the issue was resolved, if closed |
| Column | Type | Description |
|---|---|---|
| source_idPK | INT | Primary key for the issue source |
| source_name | VARCHAR(50) | Human-readable source name |
| Column | Type | Description |
|---|---|---|
| activity_idPK | INT | Primary key for the activity row |
| issue_id | INT | Foreign key to the issue |
| activity_date | DATE | Date of the activity |
| minutes_spent | INT | Minutes spent on the issue that day |