摘要:
mysql--------selecta.dname,max(if(b.mon='一月份',b.yj,0))一月份,max(if(b.mon='二月份',b.yj,0))二月份,max(if(b.mon='三月份',b.yj,0))三月份fromt2aleftjoint1bona.dep=b.depgroupbydnamemysql-------selecta.dname,sum(casewhenb.mon='一月份'thenb.yjelse0end)一月份,sum(casewhenb.mon='二月份'thenb 阅读全文