I have a query with a where condition like so:
WHERE A.event_date BETWEEN B.start_date AND B.end_date
The complexity is that if B.sta
B.sta
IFNULL might help out here:
IFNULL
WHERE A.event_date BETWEEN IFNULL(B.start_date,"1900-01-01") AND IFNULL(B.end_date,now());