这个应该怎么操作呢,求大神指导一下

解决方案 »

  1.   

    select column1,sum(case when column2='胜' then 1 else 0 end) as '胜',sum(case when column2='负' then 1 else 0 end) as '负'
    from tb
    group by column1
      

  2.   

    结帖率:0%
       
    当您的问题得到解答后请及时结贴.
    http://topic.csdn.net/u/20090501/15/7548d251-aec2-4975-a9bf-ca09a5551ba5.html
    http://topic.csdn.net/u/20100428/09/BC9E0908-F250-42A6-8765-B50A82FE186A.html
    http://topic.csdn.net/u/20100626/09/f35a4763-4b59-49c3-8061-d48fdbc29561.html8、如何给分和结贴?
    http://bbs.csdn.net/help#post_dispose
      

  3.   

    http://blog.csdn.net/acmain_chm/article/details/4283943MySQL交叉表
    在某些数据库中有交叉表,但在MySQL中却没有这个功能,但网上看到有不少朋友想找出一个解决方法,特发贴集思广义。http://topic.csdn.net/u/20090530/23/0b782674-4b0b-4cf5-bc1a-e8914aaee5ab.html?96198现整理解法如下:数据样本: create table tx(  id int primary key,  c1 c...