One way to find all the rows in table a that do not have a match in table c is to use a NOT IN subquery.
WHERE facility_id NOT IN
( — Begin sub-query of all facility_ids in table c
WHERE facility_id IS NOT NULL
) — End sub-query of all facility_ids in table c
Do another, similar query for table b.
NOT IN is a short-cut for doing not-equals operations: “facility_id NOT IN (1, 2)” is equivalent to “facility_id <> 1 AND facility_id <> 2”, and “facility_id NOT IN (subquery)” is equivalent to asserting that facility_id is not equal to any row returned by the sub-query. Note that if any row returned by the sub-query is NULL, then SQL can’t make that assertion, so remember check for NULLs in the sub-query.