In module 12, a LEFT JOIN kept a service even when no run matched. Put the failure and environment conditions in ON. For each service, COUNT(d.id) then counts the matching deployment IDs, and HAVING can select groups with a count of zero.
List registered services with zero failed runs in production. Show the service name as service and the count as failure_count. Include services that have never run and services whose failures happened only in another environment.