Basic procedure of finding meaning of correlated subquery is
Subquery is just like nested loop
first find meaning of innermost subquery. The for each tuple of outer query execute inner query.
SELECT custId
FROM customer C
WHERE C.salesRepId = E.empId
AND C.rating <> 'GOOD'
means select customer ID who has given Bad rating to employee(I am just assuming that there are only two rating Good and Bad for simplicity)
SELECT empName FROM employee E
WHERE
means for each employee execute inner query which finds customer ID who has given bad rating to this employee.
NOT EXISTS
means no such customer ID exist who has given bad rating to this employee.
Hence it selects
Names of all the employees with all their customers having a 'GOOD' rating.