I have a problem with my SQL where my goal is to create a Data Extension that the records will populate with the number of sent that a subscriber inside in one DE received by the month:
The problem is: ERROR: Automation failed due to system error. What I did wrong?
SELECT count(*) AS TotalSent,
DATENAME(month, p.EventDate) as [Month],
p.SubscriberKey as SubscriberKey
FROM _Sent p
INNER JOIN [Clients_DE] B ON p.SubscriberKey = B.AccountID
WHERE p.EventDate BETWEEN GETDATE()-30 AND GETDATE()
GROUP BY p.EventDate, p.SubscriberKey
HAVING COUNT(*) > 0