解决方案 »

  1.   

    使用子查询的那种方式
    未测试select a.* 
    , (select sum(bnum) from b where a.id = b.id) as bnum
    , (select sum(cnum) from b where a.id = c.id) as cnum
    from a 
      

  2.   

    select a.* 
    , (select sum(bnum) from b where a.id = b.id) as bnum
    , (select sum(cnum) from c where a.id = c.id) as cnum
    from a 
      

  3.   

    select *
    from A, (select id,sum(bnum) as s1 from B group by id) tb,(select id,sum(cnum) as s2 from C group by id) tc
    where A.bid=tb.id and a.cid=tc.id