select
a.AppealIdentifier,
Count(p.AttributeDescription) as TargetAudienceCount
from
DIM_Appeal a
left outer join
(select AppealDimID,AttributeDescription
from
dim_appealattribute
where AttributeCategory = 'Target Audience') p on p.AppealDimID = a.AppealDimID
group by a.AppealIdentifier
having Count(p.AttributeDescription) <>1
Find them with this SQL in BBPM:
select a.AppealIdentifier, Count(p.AttributeDescription) as TargetAudienceCount from DIM_Appeal a left outer join (select AppealDimID,AttributeDescription from dim_appealattribute where AttributeCategory = 'Target Audience') p on p.AppealDimID = a.AppealDimID group by a.AppealIdentifier having Count(p.AttributeDescription) <>1