Deployment 20 and service 20 both exist. To identify what was deployed, follow the service_id on the deployment row. Use a column alias to give each ID a clear heading.
SELECT s.id AS registry_id, s.name
FROM services AS s
WHERE s.id = 10;Look up deployment 20 using INNER JOIN. Return the deployment ID as run_id, the matched service’s primary key as service_id, and its name, in that order.