Your question is SQL Join With Aggregated Counts. Start with the requirements and the two 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.
The Fractal AI platform tracks model inference runs across multiple analytical categories. Write a PostgreSQL query that reports how many completed inference runs belong to each matching model category.
inference_runs to model_categories using category_id and return only rows with a matching category.| Column | Type | Description |
|---|---|---|
| category_idPK | INT | Unique model category identifier |
| category_name | VARCHAR(50) | Name of the analytical category |
| Column | Type | Description |
|---|---|---|
| run_idPK | INT | Unique inference run identifier |
| category_id | INT | Category associated with the inference run |
| run_status | VARCHAR(20) | Current status of the inference run |