首页 > 解决方案 > 查找过去 1 个月中每个 JOB ID 的“发送总数”以及它在 Marketing Cloud 中发送到的“列表名称”

问题描述

目前,通过使用此查询,我获得了特定 JOB id 的 total_sends 数。但我想修改查询,使其在指定的时间范围内显示每个作业 ID 的 total_sends 、 ListName 、 Date 。

Select 
count(s.EmailAddress) 
from [_Job] j 
join [_Sent] se 
on j.JobID = se.JobID 
join [_Subscribers] s 
on se.SubscriberID = s.SubscriberID 
where 
se.IsUnique = 1 and 
se.EventDate > dateadd(d,-20,getdate()) and 
j.JobID =11111 

这是我的最终表格的示例, 在此处输入图像描述 这是我正在查询的数据视图/表格的链接 - https://sfmarketingcloudhome.files.wordpress.com/2021/02/dataviews_2021_v2.png

标签: sqldataviewsalesforce-marketing-cloud

解决方案


我还没有测试过,但是这样的东西对你有用吗?如果您使用的是 Automation Studio,请确保修改/添加数据扩展中的列。

Select 
count(s.EmailAddress) as total_sends,
j.SchedTime,
ls.Listname
from [_Job] j 
join [_Sent] se 
on j.JobID = se.JobID 
join [_Subscribers] s 
on se.SubscriberID = s.SubscriberID 
join _ListSubscribers ls ON se.SubscriberID = ls.SubscriberID
where 
se.IsUnique = 1 and 
se.EventDate > dateadd(d,-20,getdate()) and 
j.JobID =11111

推荐阅读