I'm trying to do a left join on data views _Sent, EventDate but after I run the query I get about 5 times more records and I don't understand why. In my data extension I have 400.000 records and after I append the date I get 1.7 million records. This is a 3 stage campaign when customers request notification for products not in stock and the confirmation is the first step, thanking the customer for requesting an email, instock is when the product is back and they receive an email and discontinued is when the product is no longer available.

The data extensions: enter image description here

enter image description here

This is my query:


from [DataExtension] a

left join [_Sent] b
on a.SubscriberKey = b.SubscriberKey
  • You don't have a primary key in your DE - that's why it's joining every record multiple times. You could try to restrict the criteria of how it's matching the SubKey+EmailType from your DE with the SubKey+EmailName from data views – zuzannamj Apr 7 at 8:20
  • but I need to see the type, confirmation or instock for different products as one customer could have asked for multiple products. Is there a way to avoid the multiplication in this case? The DataExtension that I'm getting the records from has exactly the same structure, is just a duplication and add on the EventDate – Duicug Apr 7 at 8:23
  • Why don't you get this data by matching just the _Sent and _Job DV? I guess you should be able to get all the required data from them and then match your email type by filtering the email name or subject? – zuzannamj Apr 7 at 8:31
  • What I'm trying to achieve is to find out the customers that have been sent the confirmation email but not yet the InStock email. Would this work for my case? – Duicug Apr 7 at 8:37
  • Can you update your question with the desired output of the query? – Adam Spriggs Apr 7 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.