I've written this query to return all jobs sent in the last month. For some reason, it's returning jobs as far back as March 2017 - a full 6 months. There should be about 120, but it's showing 9,000 rows. I know Data Views only keep 6 months of data, so it looks like the date part of this query isn't being read at all - can anyone help?
SELECT EmailName, EmailSubject, CreatedDate As sendDate
FROM _Job
WHERE [CreatedDate] >= DATEADD(MONTH, -1, CAST(GETDATE() AS date))
AND EmailSubject Not Like '%Test Send%'
AND EmailName Like '%-APP-%'
OR EmailName Like '%-HIS-%'
OR EmailName Like '%-PAD-%'
OR EmailName Like '%-EXT-%'
OR EmailName Like '%-UNP-%'
OR EmailName Like '%-CLE-%'
OR EmailName Like '%-UTT-%'
OR EmailName Like '%-PRO-%'
OR EmailName Like '%-PAR-%'
OR EmailName Like '%-ADV-%'
Month -1
? – Samuel Dare Sep 6 '17 at 11:06