我需要从表1中找到至少有1个成员关联的PolicyNumber。
表1:
表2:
表3:
答案 0 :(得分:0)
select t1.UniqueNumberToPolicy, t3.MemberType, count(*) from
Table1 t1, Table2 t2, Table3 t3
where t1.UniqueNumberToPolicy = t2.UniqueNumberToPolicy
and t2.MemberNumber = t3.MemberNumber
group by t1.UniqueNumberToPolicy, t2.MemberType
having count(*) > 0