Day-time intervals are not compatible with year-month intervals Explanation: You tried to compare a value of type INTERVAL day-time (which may include the fields DAY, HOUR, MINUTE, or SECOND) with a value of type INTERVAL year-month (which may include the fields YEAR or MONTH). These two types are not compatible. User Action: Use the CAST function and compare values of the same interval class.