I am trying to run a query where I would like to find users whose last order received date is within last 30 days.

NOTE - Here I am using an inner join only to get the "First Name" field from a data extension called 'Master List'

The query validation was successful but didn't run successfully, can you please help me what I am doing wrong over here?

Query below -

Select o.Email,
o.Subscriber_Key as Subscriberkey,
m.[First Name]
From "Production" as o
Inner Join [Master List] as m
ON m.Email = o.Email
WHERE DATEDIFF(day,Last_Order_Received_Date,GETDATE()) <= 30
  • When you say it did not run successfully, does that mean it did not produce the results you expected, or does that mean the query activity failed? If you take off the where, does it pull as expected? Have you tried leaving the where, but removing the join? Start to break it apart so you know where the activity does not correspond with your expected results. – Mark_F Aug 20 '19 at 17:58
  • Yes it actually failed, I haven't tried without the where condition, I will try that and let you know – Siva Aug 21 '19 at 11:24

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.