Query table pull last 12 months
I am tying to pull the following criteria and the date is always what causes me the issue.
I want to pull people (pco_id) who have entries of "event_id" being these 2 events and whos "kind" is Regular or Guest and where the event_starts_at (date column) is in the last 12 months so that this report is always current...
Here is what I put together but I keep getting errors..HELP PLEASE!!!
SELECT
pco_id
FROM
"FINAL CheckIns People Activity with Ministry|with Holidays|Campus|Ministry"
WHERE
(event_id = 477141 OR event_id = 757971)
AND (kind = 'Regular' OR kind = 'Guest')
AND event_starts_date >= DATE_ADD(CURDATE(), INTERVAL -12 MONTH)