I'm in the process of building a query that will give me a count of all links a subscriber has clicked on from recent sends. I have a query written out using the salesforce documentation, and I have tried multiple variations. I keep getting the unhelpful error "Automation failed due to system error". Would anyone be able to tell me where I am going wrong with my approach?
Link to salesforce doc below
select s.subscriberkey,
s.jobid,
s.batchid,
s.eventdate As SendDate,
c.LinkName as URL_ID,
c.LinkContent as URL,
c.subscriberid as SubID
From [_sent] as s
left join [_open] as o
on s.jobid = o.jobid
and s.listid = o.listid
and s.batchid = o.batchid
and s.subscriberid = o.subscriberid
and o.isunique = 1
left join [_click] as c
on s.jobid = c.jobid
and s.listid = c.listid
and s.batchid = c.batchid
and s.subscriberid = c.subscriberid
and c.isunique = 1
WHERE ( o.subscriberid IS not NULL
AND c.subscriberid IS not NULL )
and s.eventdate >= DATEADD(day, -7, CURRENT_TIMESTAMP)