Adding "isExpired and not isPending"
SELECT s1.publicationName, Customer.fullName, Customer.address
FROM Subscriptions s1
LEFT JOIN Customers
ON s1.id_Customer = Customers.id
LEFT JOIN Publications
ON s1.id_Publication = Publications.id
WHERE s1.endIssueNumber < Publications.currentIssueNumber
AND Customers.isDeceased = 0
AND Customers.isDeleted = 0
AND s1.isExpired = 1
AND (SELECT COUNT(*) FROM Subscriptions s2
WHERE s2.id_Publication = s1.id_Publication AND s2.id_Customer = s1.id_Customer AND s2.isPending = 1) = 0
Genius!!! That's exactly what I'm after. I hadn't thought of the second select to count the pending subscriptions.
Thanks so much!