看板 Database 關於我們 聯絡資訊
select authen.account_cc, IF(authen.account_source ='ooo' OR authen.account_source='xxx',count(authen.account_cc),0) from authen as authen group by authen.account_cc 因為用了group by 會讓一樣的變成群組((幹你不是在說廢話嗎? 可是我只是想要把 xxx ooo other印出來 照目前來看~他會印出 xxx 100 ooo 200 yyy 1 zzz 2 eee 3 我是想把yyy zzz eee 全加起來丟到 other裡........ xxx 100 ooo 200 other 6 甘無有方法耶!?就甘心耶! 剛學沒多久╮(v.v 指點一下小妹好嗎>////<謝謝 -- — — ▼▼▼▼ ▲▲▲▲ < 口卡... | |  ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.60.217.83
glennchen:給Label後再group by就好啦 06/04 16:37
科科@@"剛去翻了一下label不太懂= =java???? ※ 編輯: adbecf 來自: 61.60.217.83 (06/04 17:41)
glennchen:就是先幫他標1, 2, 3之類的 06/04 18:00