select
DATE_FORMAT(DATE_ADD(DATE_ADD(day,INTERVAL -26 day),INTERVAL 1 month),"%Y-%m") as tt,
sum(code) as mm
from dim_dic_date_2021
group by
DATE_FORMAT(DATE_ADD(DATE_ADD(day,INTERVAL -26 day),INTERVAL 1 month),"%Y-%m")
——————————————————
-- 「财年」的统计逻辑,以MySQL为例,参考写法!