SFMC all subscribers in all business units
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 | |
s.SubscriberID | |
, s.SubscriberKey | |
, s.Status | |
, s.EmailAddress | |
, s.DateUnsubscribed | |
, s.DateJoined | |
, s.DateUndeliverable | |
, b.businessUnitMID | |
, b.businessUnitName | |
from _subscribers s | |
outer apply ( | |
select 1 businessUnitMID, 'Business Unit Name 1' businessUnitName union all | |
select 2 businessUnitMID, 'Business Unit Name 2' businessUnitName union all | |
select 3 businessUnitMID, 'Business Unit Name 3' businessUnitName union all | |
select 4 businessUnitMID, 'Business Unit Name 4' businessUnitName union all | |
select 5 businessUnitMID, 'Business Unit Name 5' businessUnitName | |
) b | |
/* name: subscribers_all */ | |
/* target: subscribers_all */ | |
/* action: overwrite */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment