select rq 日期,sum(decode(shengfu,'胜',1,'负',0)) 胜,sum(decode(shengfu,'负',1,'胜',0)) 负 from tmp group by rq;
结果: