mysql previous year code example
Example: mysql previous year
SELECT * FROM my_table
WHERE YEAR(my_date) = YEAR(DATE_SUB(CURDATE(), INTERVAL 1 YEAR));
SELECT * FROM my_table
WHERE YEAR(my_date) = YEAR(DATE_SUB(CURDATE(), INTERVAL 1 YEAR));