0

We want to setup a survey, which should be sent the day after the send-out have happened. We are trying to achieve this by using Automation studio and looking through the send and job data view. However, when trying to look for the send-outs the day before I am also getting the data of other send-outs that have been send many days prior. Does any one have a great solution to achieve this?

This is query I am working with so far:

SELECT  Count(s.EventDate)
FROM _Job j
JOIN _sent s
ON j.JobID = S.JobID
WHERE j.EMailName LIKE 'EMAIL_NAME'
AND s.EventDate BETWEEN Cast(Dateadd(day, -1, Getdate()) AS DATE) AND
                               Cast(
                               Getdate() AS DATE)
GROUP BY  s.EventDate

1 Answer 1

1

If you just want a send count for a particular email for yesterday:

SELECT 
Count(*) sendCount
FROM _Job j
INNER JOIN _sent s ON S.JobID = j.JobID 
WHERE j.EMailName LIKE '%YOUREMAILNAMEPATTERNHERE%'
AND s.EventDate >= convert(date, getDate()-1) 
and s.EventDate < convert(date, getDate()) 
GROUP BY convert(date, s.EventDate)

Translation:

Give me a count of all sends to emails that contain YOUREMAILNAMEPATTERN that occurred up to and after midnight yesterday and before midnight today.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .