Created
January 26, 2021 23:57
-
-
Save wvpv/1f5073822feb8f3bc28d80b168c6a5f0 to your computer and use it in GitHub Desktop.
SFMC unsubscribes per business unit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
u.BusinessUnitID businessUnitMID | |
, u.SubscriberKey | |
, u.subscriberId | |
, 'unsubscribed' Status | |
, u.UnsubDateUTC DateUnsubscribed | |
, case | |
when u.businessUnitID = 1 then 'Business Unit Name 1' | |
when u.businessUnitID = 2 then 'Business Unit Name 2' | |
when u.businessUnitID = 3 then 'Business Unit Name 3' | |
when u.businessUnitID = 4 then 'Business Unit Name 4' | |
when u.businessUnitID = 5 then 'Business Unit Name 5' | |
end businessUnitName | |
FROM _BusinessUnitUnsubscribes u | |
/* name: subscribers_all_unsubs */ | |
/* target: subscribers_all */ | |
/* action: update */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment