累加问题
---有这样一个表create table b(valuess int ,classfiy int ,companyid int)insert into bselect 3,1,1union all select 4,1,1union all select 5,1,1union all select 5,2,1union all select 7,2,1union all select 5,2,1union all select 5,3,1union all select 7,3,1union all select 8,3,1union all select 4,1,2union all select 5,1,2union all select 5,2,2union all select 7,2,2union all select 5,2,2union all select 5,3,2union all select 7,3,2union all select 8,3,2----运行了这下面段出结果select SUM(valuess)vvvvv from b ygroup by companyid,classfiyorder by companyid