TIMESTAMPDIFF(unit, datetime1, datetime2)
SELECT TIMESTAMPDIFF(YEAR,'2012-06-12','2022-12-05');
SELECT TIMESTAMPDIFF(DAY,'2022-06-12','2022-12-05');