0

I have SQL in place now but it is not excluding any bounces. Can you help me add a bounce SQL query in it? My current query in place for the list I want to pull.

select email, max(date_added) as date_added 
from [DE] 
Where email not like '%@company.com'
group by email

Thanks!!

2

You would need to reference the _Bounce Dataview to get this info. The below is based on that 'email' field from your DE is equal to your subscriberkey. You may need to adjust this depending on what field is your sendable field.

SELECT a.email, max(a.date_added) as date_added
FROM [DE] a
WHERE a.email not like '%@company.com'
AND NOT EXISTS (
  SELECT TOP 1 b.Subscriberkey
  FROM [_Bounce] b
  WHERE b.Subscriberkey = a.email
  AND b.BounceCategory IN ('Hard bounce','Block bounce')
)
group by a.email

The NOT EXISTS will remove any records that have a hard or block bounce that is recorded in your Bounce Dataview.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.