I'm trying to exclude the Christmas period between two dates every year in my database. This is the query I'm trying to run. From my understanding this should include every row, for every year with the exception of rows where the month is <= 12 and day <= 15 and where the month is <= 12 and day >= 26.
The result, however, doesn't appear to return any rows at all!
SELECT
*
FROM
transactons
WHERE
event_date BETWEEN TO_DATE("2016-12-01")
AND TO_DATE("2021-12-31")
AND ((EXTRACT(MONTH FROM event_date) <= 12 AND EXTRACT(DAY FROM event_date) <= 15)
AND (EXTRACT(MONTH FROM event_date) <= 12 AND EXTRACT(DAY FROM event_date) >= 26))
Does anyone have any suggestions as to how to filter out Dec-15 to Dec-26 each year here?