你在数据集里面用一个月份表去关联业务数据表就行了。这样就可以展示出来其它月份了
建议做一个月份维度的表,这样用表关联就行了!,而且方便后期所有业务表来使用
比如类似这样oracel数据库里面:
with a as (
select '1月' month_code,1 as month_number
union all
select '2月',2
union all
select '3月',3
union all
select '4月',4
union all
select '5月',5
union all
select '6月',6
union all
select '7月',7
union all
select '8月',8
union all
select '9月',9
union all
select '10月',10
union all
select '11月',11
union all
select '12月',12
)
select a.month_code,b.* from a
left join (SELECT
month_code,/*业务月份*/
amount
from 订单表 ) b on a.month_code=b.month_code
order by a.month_number/*排序用的*/