Skip to content

Instantly share code, notes, and snippets.

@zuzannamj
Created September 27, 2019 20:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save zuzannamj/224848eceea1fbc0a19956e5105f41f2 to your computer and use it in GitHub Desktop.
SELECT DISTINCT
s.SubscriberKey,
j.EmailName
FROM _Sent s
LEFT JOIN _Job j
ON s.JobID = j.JobID
LEFT JOIN _Open o
ON s.JobID = o.JobID AND s.ListID = o.ListID AND s.BatchID = o.BatchID AND s.SubscriberID = o.SubscriberID AND o.IsUnique = 1
LEFT JOIN _Click c
ON s.JobID = c.JobID AND s.ListID = c.ListID AND s.BatchID = c.BatchID AND s.SubscriberID = c.SubscriberID AND c.IsUnique = 1
WHERE
s.EventDate > dateadd(d,-7,getdate())
AND (o.SubscriberID is NULL AND c.SubscriberID is NULL)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment