मुझे SUM-CASE दृष्टिकोण पसंद है:
SELECT x.name
FROM
(SELECT c.name, SUM(CASE WHEN b.paid_out THEN 0 ELSE 1 END) all_paid
FROM customers c JOIN living_places l ON c.ID = l.ID
JOIN policies p ON l.code = p.code_living_place
JOIN bills b ON p.code_policy = b.code_policy
GROUP BY c.name) x
WHERE x.all_paid = 0;
हो सकता है कि आप यहां भी HAVING क्लॉज का उपयोग करके नेस्टेड SELECT से बच सकें...