Write a SQL query to find the first defect created after each deployment.
Use the deployments and defects tables. Match records by service; a defect qualifies only when it was created strictly after the deployment. Include deployments with no subsequent defect.
deployment_id, service, deployed_at, defect_id, and defect_created_at.deployment_id ascending, breaking ties by the smallest defect_id.| Column | Type | Description |
|---|---|---|
| deployment_idPK | INT | Unique deployment identifier |
| service | VARCHAR(100) | Service deployed |
| deployed_at | TIMESTAMP | Deployment completion timestamp |
| Column | Type | Description |
|---|---|---|
| defect_idPK | INT | Unique defect identifier |
| service | VARCHAR(100) | Service associated with the defect |
| created_at | TIMESTAMP | Defect creation timestamp |