a标签1支行 12支行 03支行 0 b标签1支行 12支行 03支行 1 c标签1支行 22支行 03支行 1 a标签 b标签 c标签1支行 1 1 22支行 0 0 03支行 0 1 1
1 回答

HUWWW
TA贡献1874条经验 获得超12个赞
select type,a标签=sum(case when name='a标签' then convert(int,value) else 0 end),
b标签=sum(case when name='b标签' then convert(int,value) else null end),
c标签=sum(case when name='c标签' then convert(int,value) else null end )
from table_1 group by type
添加回答
举报
0/150
提交
取消