本帖最后由 laperte 于 2012-05-21 10:25:17 编辑

解决方案 »

  1.   

    表A 表B?   都有哪些字段? from table 然后条件  不觉得有点问题么?
      

  2.   


    --如果 是一个表
    select person, count(liketodo)
    from table
    group by person;--两个表(表B可能是每个人的id了?  用id关联取名称)
    select a.person, count(b.liketodo)
    from tb1 a,tb2 b
    where a.personid = b.personid;
    group by a.person
      

  3.   

    table_person=A Table_liketodo=Bmike.....................................football
    john......................................basketball
    charley.................................table tennis
    david....................................football
    mike.....................................table tennis
    john......................................football sorry 刚才说的不是很明白,现在呢
      

  4.   

    哦我的错。是两个列(colume)。。不是table sorry 囧,谢谢啦我看下
      

  5.   

    OK  le ...  keyi yong ...
    thank you very much.