Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marketingclouded/7588e3122af1ad1a251e83311bc02b0a to your computer and use it in GitHub Desktop.
Save marketingclouded/7588e3122af1ad1a251e83311bc02b0a to your computer and use it in GitHub Desktop.
Tracking Inactive Subscribers in SFMC: Updates Subscriber_Last_Open with _Subscribers and Last Sent
SELECT
e.EmailAddress,
e.SubscriberID,
e.Status,
e.DateJoined,
e.DateUnsubscribed,
MAX(d.EventDate) AS 'LastSentDate',
COUNT(d.SubscriberID) AS Sent
FROM _Subscribers e
JOIN _Sent d
ON e.SubscriberID = d.SubscriberID
GROUP BY e.SubscriberID, e.EmailAddress, e.Status, e.DateJoined, e.DateUnsubscribed
HAVING COUNT(d.SubscriberID) > 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment