Find the sids of the suppliers who supply every part
3 tables: Suppliers(sid, sname, address), Parts(pid, pname, colour), Catalog(sid, pid, cost) The answer to find all the suppliers who supply every part is: SELECT C.sid FROM Catalog C WHERE NOT EXISTS ( SELECT P.pid FROM Parts P WHERE NOT EXISTS ( SELECT C1.sid FROM Catalog C1 WHERE C1.sid = C.sid AND C1.pid = P.pid ) ) Could someone explain this answer to me? I'm just a bit lost! I've heard it explained as 'Find suppliers such that there does not exist a part that they do not sell', but I'm struggling to see how SELECT C1.sid FROM Catalog C1 WHERE C1.sid = C.sid AND C1.pid = P.pid )