解决方案 »

  1.   


    --上边按错,不好意思
    select a.a,a.b,c.e
    from a join (select c,count(1) as d from b group by c) c on a.a = c.c
      

  2.   


    select A,B count(D)as E from (
    select * from 表A as a left join 表B as b on a.B=b.C
    ) as c
      

  3.   


    select a.a,a.b,c.e
    from a join (select c,count(1) as d from b group by c) c on a.b = c.c
    --用姓名关联?
      

  4.   

    SELECT A.A,A.B,COUNT(B.A)E FROM A LEFT JOIN B ON A.B=B.A GROUP BY A.A,A.B
      

  5.   

    select a.a,a.b,COUNT(a.a) as e from a join b 
    on a.b=b.c
    group by a.a
      

  6.   

    select *,(select COUNT(*) from 表B where c=b)e  from 表A
      

  7.   

    select a.a,a.b,c.e
    from a join (select c,count(1) as d from b group by c) c on a.a = c.c