I have SQL running from a Data extension where I have all marketing opted in contacts, now I need to add a field to the SQL with the device level Opt in and Out options as I will further use these in a journey, where customers who opted in will receive a push and those who opted out will get an email. I'm not sure how to write this query. I wanted to join it with _PushAddress data view table but it doesn't have a Subscriber key to match it with the Subscriber key. I could perhaps join it with a Filtered Mobile List but do I make it using 2 filters: OptedIn=2 and OptedIn=1? I'd appreciate any suggestions as to what source I can use to join with the current data extension. My SQL query looks like this for the time being:
SELECT a.Email a.Campaign a.Subscriberkey b.OptIn b.OptOut FROM DataExtension1 INNER JOIN ... on a.Subscriberkey=...