I'm trying to get the customers who open or click an email and I'm not sure what I'm doing wrong. If I only join the Click or Open, it works but when I do them together, it is timing out which means I'm not doing the joins right.
I only have 200.000 records in recipients
Here is my query
SELECT
r.customerID AS SubscriberKey,
r.shouldbesentmarketingemails AS Subscribed,
j.EmailName,
c.EventDate AS ClickDate,
o.EventDate AS OpenDate
FROM [Recipients] r
JOIN _Open o
ON r.customerID = o.SubscriberKey
JOIN _Job j
ON o.JobID = j.JobID
JOIN _Click c
ON o.JobID = c.JobID
WHERE
j.EmailName = '245'
AND
r.shouldbesentmarketingemails = 'true'