Skip to content

Instantly share code, notes, and snippets.

@psapir
Last active January 7, 2018 14:48
Show Gist options
  • Save psapir/992314a68b9dc2f3cc2e90787216bd37 to your computer and use it in GitHub Desktop.
Save psapir/992314a68b9dc2f3cc2e90787216bd37 to your computer and use it in GitHub Desktop.
/*
This query populates an author DE by Selecting everyone who is in the MacAlertList who is also in the Subscriptions DE
*/
SELECT a.[Subscriber Key]
FROM MacAlertList a
WHERE Alerts like '%2658519%'
AND EXISTS (SELECT [Subscriber Key] FROM Subscriptions s WHERE s.[SubscriberKey] = a.[Subscriber Key] AND s.[DE Name] = 'Alan Weisman author alert - 2658519')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment