可能なクエリ 1:
SELECT M.* FROM tblPolicies AS M
WHERE premium = 0 AND policyNumber NOT IN
(
SELECT S.policyNumber
FROM tblPolicies AS S
WHERE S.policyNumber = M.policyNumber
AND S.premium <> 0
)
可能なクエリ 2:
SELECT SA.* FROM
(
SELECT M.* FROM tblPolicies AS M
WHERE premium = 0
) AS SA
INNER JOIN tblPolicies AS SB
ON SA.policyNumber = SB.policyNumber
WHERE SB.premium <> 0
可能なクエリ 3:
SELECT * FROM tblPolicies AS SA
INNER JOIN tblPolicies AS SB
ON SA.policyNumber = SB.policyNumber
WHERE SA.premium = 0 AND SB.premium <> 0