标签:
select rq 日期,sum(decode(shengfu,‘胜‘,1,‘负‘,0)) 胜,sum(decode(shengfu,‘负‘,1,‘胜‘,0)) 负 from tmp group by rq;
结果:
decode 横竖转换
原文地址:http://www.cnblogs.com/feng666666/p/5899087.html