34,873
社区成员
发帖
与我相关
我的任务
分享--> 测试数据:@table
declare @table table([id] varchar(4),[日期] varchar(10),[绩效] dec(9,2))
insert @table
select '001','2009-10-15',100 union all
select '001','2009-11-02',200 union all
select '001','2009-11-25',150
select id,sum(绩效) as 工作绩效
from @table
group by id
--------------
001 450.00
select
convert(varchar(7),time,120),sum(工作量)
from
tb
group by
convert(varchar(7),time,120)