SELECT * FROM ta_product WHERE update_date >= DATE_SUB(NOW() , INTERVAL 1 MONTH) AND enable = 1 OR update_date >= DATE_SUB(NOW() , INTERVAL 1 YEAR) GROUP BY product_id;
SELECT *
FROM ta_product
WHERE (
update_date >= DATE_SUB(NOW() , INTERVAL 1 MONTH)
OR update_date >= DATE_SUB(NOW() , INTERVAL 1 YEAR)
)
AND enable = 1
GROUP BY product_id;