with tiaojian as ( select job, date_format(date,"%Y-%m") as month, sum(num) as py from resume_info group by job,date_format(date,"%Y-%m") ) select t1.job, t1.month, t1.py, t2.month, t2.py from tiaojian t1 inner join tiaojian t2 on t1.job=t2.job and left(t1.month,4)<>left(t2.month,4) and right(t1.month,2)=right(t2.month,2) where left(t1.month,4) in (2025,2026) and left(t2.month,4) in (2025,2026) and left(t1.month,4)<left(t2.month,4) order by t1.month desc,t1.job desc