I'm trying to run a query to load data into a data extension. It basically pulls sends from the last x number of days from the Sent data view table. I'm trying to just have a record populate for a unique subscriber key from the records most recent send. Here is my query below:
SELECT sent.AccountID , sent.OYBAccountID , sent.JobID , sent.ListID , sent.BatchID , sent.SubscriberID , DISTINCT sent.SubscriberKey , sent.EventDate , sent.Domain , sent.TriggererSendDefinitionObjectID , sent.TriggeredSendCustomerKey , j.EmailName FROM _Sent AS sent LEFT JOIN ENT._subscribers AS sub ON sub.SubscriberKey = sent.SubscriberKey LEFT JOIN _job AS j ON j.JobID = sent.JobID WHERE DATEDIFF(day,sent.EventDate,GETDATE()) between 0 and 61
How can I get this table to show a list of my subscribers that have received an email in the past 60 days? I just want unique subscriber keys and the most recent email they have been sent.