你年和月是分开的这还不好办?
。。。。。两个数据集不就搞定了
一个数据集查当年期间的,另一个数据集查同期的
/*当年期间的*/
select * from 你的表
where 1=1
and fyear='${year_code}'
and fmonth >='${strart_monthcode}'
and fmonth <='${end_monthcode}'
/*去年同期的*/
select * from 你的表
where 1=1
and fyear='${year_code-1}'
and fmonth >='${strart_monthcode}'
and fmonth <='${end_monthcode}'
就是你的参数有年,开始月,结束月