解决方案 »

  1.   

    select count(1),from as 发消息的人  from A where from!=to  group by 发消息的人
      

  2.   

    select count(*)- 
    (select floor(count(*)/2) from
    (select * from talk A group by a,b) tmp1,(select * from talk A group by a,b) tmp2 where  tmp1.a = tmp2.b and tmp2.a = tmp1.b)
    from (select count(*) from talk group by a,b) tmp
    talk 是彪马talk是表名a,b是字段名称