Write an SQL query and the purpose is to insert all the unsubscribed data into the data extension.

 SELECT

U.SubscriberKey,

U.JobID,

U.EventDate AS UnsubscribeDate,

J.EmailName,

J.EmailSubject,

S.EventDate AS SendDate,

'Austin Marketing' AS 'Austin Unit'

FROM

_Unsubscribe AS U

INNER JOIN

_Job AS J ON U.JobID = J.JobID

INNER JOIN

_Sent AS S ON U.JobID = S.JobID

WHERE

U.IsUnique = '1'

AND U.EventDate >= DATEADD(DAY, -1, CAST(GETDATE() AS DATE))

AND U.EventDate < CAST(GETDATE() AS DATE)

Comments

Popular posts from this blog

What are the different Content Blocks in SFMC ?

What is the different email-sending options in SFMC with examples?

Data Extension and List in SFMC