sum(case when year(achievement_date) <>2023 and achievement_date <= 'yeardelta('${end_date}',-2)' then contract_product else 0 end)请问这样写有没有问题,对于这个end_date参数
if(len(end_date)==0,"sum(contract_product)","sum(case when year(achievement_date) <>2023 and achievement_date <= '"+end_date+"' then contract_product else 0 end)") from ........