34,588
社区成员
发帖
与我相关
我的任务
分享
--1
select r.NAME,count(*)
from t_corp t join R$ORG r on t.belong_dist_org = r.ORG_ID
where year(start_date)=2008
group by r.NAME
--2
select count(*)
from t_corp
where start_date < '2008-3-01' belong_dist_org = '1331'
select r.NAME,count(*)
from t_corp t join R$ORG r on t.belong_dist_org = r.ORG_ID
where start_date < '2008-3-01' and( t.org_id = '1331' or t.PARENT_ORG_ID = '1331'
group by r.NAME