sql - 查找过去 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
解决方案
我还没有测试过,但是这样的东西对你有用吗?如果您使用的是 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
推荐阅读
- css - 如何使具有最大宽度的水平拉伸网格项目居中
- ios - 在 Notification Service 和应用程序之间使用 iOS App Group 容器共享文件(颤振)
- php - 在 WooCommerce 中自动处理已付款订单而不是自动完成
- react-native - React Native TopTabNavigator 图标未显示
- angular - 我如何以自己的方式设计 Angular 10 Material Select(和其他)
- matrix - 如何检查矩阵中的 undef 值(在 Julia 中)并分配一个新值?
- sql - 如何在 postgres jsonb 列中搜索特定的键值?
- c - 自 1970 年 1 月 1 日以来的年、月、周、日、小时
- html - 子容器上边距拉低父上边距
- java - java.io.IOException:createNewFile() 的权限被拒绝