sql视图下:
select a.*,b.总订货量from 表名 as a,(select 类别,sum(订货量) as 总订货量 from 表名 group by 类别) as bwhere a.类别=b.类别
表名替换成你自己起的表名