亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

java 或者 db2數據庫 列傳行。將上面的數據轉成下面的格式

java 或者 db2數據庫 列傳行。將上面的數據轉成下面的格式

慕斯709654 2018-07-13 13:19:58
    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個贊

https://img1.sycdn.imooc.com//5b582efc000168c611410494.jpg

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

查看完整回答
反對 回復 2018-07-25
  • 1 回答
  • 0 關注
  • 729 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號