Skip to main content
Became Hot Network Question
added 13 characters in body
Source Link
zuzannamj
  • 14.5k
  • 3
  • 27
  • 56

Having trouble getting the SQL right for this. I'm looking to get a total count of emails a specific subscriber received in the last 30 days. But it keeps failing. I'd also like to be able to query what those emails were during that same timeframe.

SELECT s.SubscriberKey COUNT (SubscriberKey) AS SENT_COUNT FROM _Sent WHERE JobID IN (SELECT JobID FROM _Job WHERE SubscriberKey = 'XXX') and EventDate between '2022-07-18' and '2022-08-18'

SELECT s.SubscriberKey COUNT (SubscriberKey) AS SENT_COUNT FROM _Sent
WHERE JobID IN (SELECT JobID FROM _Job WHERE SubscriberKey = 'XXX')
and EventDate between '2022-07-18' and '2022-08-18'

Having trouble getting the SQL right for this. I'm looking to get a total count of emails a specific subscriber received in the last 30 days. But it keeps failing. I'd also like to be able to query what those emails were during that same timeframe.

SELECT s.SubscriberKey COUNT (SubscriberKey) AS SENT_COUNT FROM _Sent WHERE JobID IN (SELECT JobID FROM _Job WHERE SubscriberKey = 'XXX') and EventDate between '2022-07-18' and '2022-08-18'

Having trouble getting the SQL right for this. I'm looking to get a total count of emails a specific subscriber received in the last 30 days. But it keeps failing. I'd also like to be able to query what those emails were during that same timeframe.

SELECT s.SubscriberKey COUNT (SubscriberKey) AS SENT_COUNT FROM _Sent
WHERE JobID IN (SELECT JobID FROM _Job WHERE SubscriberKey = 'XXX')
and EventDate between '2022-07-18' and '2022-08-18'
Source Link
ld123
  • 19
  • 2

Query # of emails a specific subscriber received in the last 30 days

Having trouble getting the SQL right for this. I'm looking to get a total count of emails a specific subscriber received in the last 30 days. But it keeps failing. I'd also like to be able to query what those emails were during that same timeframe.

SELECT s.SubscriberKey COUNT (SubscriberKey) AS SENT_COUNT FROM _Sent WHERE JobID IN (SELECT JobID FROM _Job WHERE SubscriberKey = 'XXX') and EventDate between '2022-07-18' and '2022-08-18'