27,580
社区成员
发帖
与我相关
我的任务
分享
select a1.NAME,count(b1.id) from a as a1
join b as b1 on a.id =b.id
group by A1.NAME
select
A.name,count(1) as num
from
a,b
where
exists(select 1 from a where id=a.id) and a.id=b.id
group by
A.name
---写掉条件了
select
A.name,count(1) as num
from
a,b
where
exists(select 1 from a where id=a.id) and a.id=b.id
select a1.id,count(b1.id) from a as a1
join b as b1 on a.id =b.id
group by A1.id
select a1.id,count(b1.id) from a as a1
join b as b1 on a.id =b.id
group by b1.id
select A.name,count(1) as num from b where exists(select 1 from a where id=a.id)
select count(1) as num from b where exists(select 1 from a where id=a.id)
select count(*) from B where id in ( seelct Id from a);
scount count(*) from B where id in ( seelct Id from a);