Given a set of data, write a SQL query to extract specific insights.
Using the supplied model_versions and inference_events tables, analyze completed inference events from January 2026 for active model versions. Include model versions with no qualifying events and exclude events that cannot be associated with an active model version.
model_version_id, model_name, total_completed_events, avg_latency_ms, high_confidence_events, and accuracy_pct.model_version_id ascending.| Column | Type | Description |
|---|---|---|
| model_version_idPK | INT | Unique model version identifier |
| model_name | VARCHAR(100) | Model name |
| version_label | VARCHAR(30) | Human-readable version label |
| is_active | BOOLEAN | Whether the model version is active |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique inference event identifier |
| model_version_id | INT | Referenced model version |
| occurred_at | TIMESTAMP | Event timestamp |
| status | VARCHAR(20) | Inference processing status |
| latency_ms | INT | Inference latency in milliseconds |
| confidence | DECIMAL(4,3) | Prediction confidence score |
| predicted_label | VARCHAR(100) | Label produced by the model |
| actual_label | VARCHAR(100) | Verified reference label |