A primary key identifies one service, but several deployments can reference it. The join produces a row for each matching pair. Table aliases such as d and s shorten the column references.
SELECT d.id, s.name
FROM deployments AS d
INNER JOIN services AS s ON d.service_id = s.id
WHERE s.name = 'billing';Join the tables and show name and status for every deployment of the service named worker. Keep one row per run, including rows whose displayed values are identical.