Skip to main content

Markerting Marketing Cloud SQL Query - Show All Send Stats by Subscriber Across All Journeys

Just like the below SQL to see who bounced in Journey Send Emails, can expand this to include everyone? If they've bounced or not?

select s.JobID, s.ListID, s.BatchID, s.EventDate as 'SendTime', b.EventDate as 'BounceTime', su.EmailAddress, j.JourneyName, j.VersionNumber, ja.ActivityName as 'EmailName' from [_Sent] s join [_JourneyActivity] ja on s.TriggererSendDefinitionObjectID = ja.JourneyActivityObjectID join [_Journey] j on ja.VersionID = j.VersionID join [_Sent] b on s.JobID = b.JobID and s.ListID = b.ListID and s.BatchID = b.BatchID and s.SubscriberID = b.SubscriberID join [_Subscribers] su on s.SubscriberID = su.SubscriberID where ja.ActivityType in ('EMAIL','EMAILV2') and b.SubscriberID is not null

select 
s.JobID, 
s.ListID, 
s.BatchID, 
s.EventDate as 'SendTime', 
b.EventDate as 'BounceTime', 
su.EmailAddress,
j.JourneyName, 
j.VersionNumber, 
ja.ActivityName as 'EmailName' 
from [_Sent] s 
join [_JourneyActivity] ja 
on s.TriggererSendDefinitionObjectID = ja.JourneyActivityObjectID 
join [_Journey] j 
on ja.VersionID = j.VersionID 
join [_Sent] b 
on s.JobID = b.JobID 
and s.ListID = b.ListID 
and s.BatchID = b.BatchID 
and s.SubscriberID = b.SubscriberID 
join [_Subscribers] su 
on s.SubscriberID = su.SubscriberID 
where ja.ActivityType in ('EMAIL','EMAILV2') 
and b.SubscriberID is not null

Just like the below SQL to see who bounced in Journey Send Emails, can expand this to include everyone? If they've bounced or not?

select s.JobID, s.ListID, s.BatchID, s.EventDate as 'SendTime', b.EventDate as 'BounceTime', su.EmailAddress, j.JourneyName, j.VersionNumber, ja.ActivityName as 'EmailName' from [_Sent] s join [_JourneyActivity] ja on s.TriggererSendDefinitionObjectID = ja.JourneyActivityObjectID join [_Journey] j on ja.VersionID = j.VersionID join [_Sent] b on s.JobID = b.JobID and s.ListID = b.ListID and s.BatchID = b.BatchID and s.SubscriberID = b.SubscriberID join [_Subscribers] su on s.SubscriberID = su.SubscriberID where ja.ActivityType in ('EMAIL','EMAILV2') and b.SubscriberID is not null

Just like the below SQL to see who bounced in Journey Send Emails, can expand this to include everyone? If they've bounced or not?

select 
s.JobID, 
s.ListID, 
s.BatchID, 
s.EventDate as 'SendTime', 
b.EventDate as 'BounceTime', 
su.EmailAddress,
j.JourneyName, 
j.VersionNumber, 
ja.ActivityName as 'EmailName' 
from [_Sent] s 
join [_JourneyActivity] ja 
on s.TriggererSendDefinitionObjectID = ja.JourneyActivityObjectID 
join [_Journey] j 
on ja.VersionID = j.VersionID 
join [_Sent] b 
on s.JobID = b.JobID 
and s.ListID = b.ListID 
and s.BatchID = b.BatchID 
and s.SubscriberID = b.SubscriberID 
join [_Subscribers] su 
on s.SubscriberID = su.SubscriberID 
where ja.ActivityType in ('EMAIL','EMAILV2') 
and b.SubscriberID is not null
added 504 characters in body
Source Link
JFH
  • 37
  • 1
  • 5

MuchJust like the below SQL to see who bounced in Journey Send Emails, can I create a SQL queryexpand this to out not just people whoinclude everyone? If they've bounced or not?

select s.JobID, but everyone and their stats per email s. Across our 21 Journeys we have just over 1 million sendsListID, s. I want a DE showing all 1million sendsBatchID, s.EventDate as 'SendTime', b.EventDate as 'BounceTime', su.EmailAddress, j.JourneyName, j.VersionNumber, ja.ActivityName as 'EmailName' from [_Sent] s join [_JourneyActivity] ja on s.TriggererSendDefinitionObjectID = ja.JourneyActivityObjectID join [_Journey] j on ja.VersionID = j.VersionID join [_Sent] b on s.JobID = b.JobID and s.ListID = b.ListID and s.BatchID = b.BatchID and s.SubscriberID = b.SubscriberID join [_Subscribers] su on s.SubscriberID = su.SubscriberID where ja.ActivityType in ('EMAIL','EMAILV2') and b.SubscriberID is not null

Much like the SQL to see who bounced in Journey Send Emails, can I create a SQL query to out not just people who bounced, but everyone and their stats per email. Across our 21 Journeys we have just over 1 million sends. I want a DE showing all 1million sends.

Just like the below SQL to see who bounced in Journey Send Emails, can expand this to include everyone? If they've bounced or not?

select s.JobID, s.ListID, s.BatchID, s.EventDate as 'SendTime', b.EventDate as 'BounceTime', su.EmailAddress, j.JourneyName, j.VersionNumber, ja.ActivityName as 'EmailName' from [_Sent] s join [_JourneyActivity] ja on s.TriggererSendDefinitionObjectID = ja.JourneyActivityObjectID join [_Journey] j on ja.VersionID = j.VersionID join [_Sent] b on s.JobID = b.JobID and s.ListID = b.ListID and s.BatchID = b.BatchID and s.SubscriberID = b.SubscriberID join [_Subscribers] su on s.SubscriberID = su.SubscriberID where ja.ActivityType in ('EMAIL','EMAILV2') and b.SubscriberID is not null

Source Link
JFH
  • 37
  • 1
  • 5
Loading