You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
1.6 KiB
23 lines
1.6 KiB
--11 普通中专
|
|
--14 全日制 成人中专
|
|
--17 非全日制 成人中专
|
|
--20 职业高中
|
|
SELECT sbr.organizationNo ,1 as schoolTypeGroupNo,'一、高中阶段' as schoolTypeGroup,2 as schoolTypeGroupNo2,'(二)中等职业学校' as schoolTypeGroup2 ,sbr.businessTypeNo,case when sbr.businessTypeNo in ('368','369') then '其他机构(班)' else sbr.businessType end as businessType
|
|
, sbr.isCount , sum(h) as zhaoshengNo,sum(i) as zhaoshengNo2,sum(j) as zhaoshengNo3,sum(k) as zhaoshengNo4
|
|
,sum(m+n+o+p) as zaixiaoNo,sum(m) as zaixiaoNo2,sum(n) as zaixiaoNo3,sum(o) as zaixiaoNo4,sum(p) as zaixiaoNo5
|
|
,sum(f) as biyeNo,sum(g) as biyeNo2,sum(q) as biyeNo3,sum(r) as biyeNo4
|
|
from schoolBusinessRelation sbr
|
|
inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno
|
|
inner join Z311 as j on j.instanceid =it.instanceid and j.did in (11,14,17,20)
|
|
where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('361','362','363','364','365','368','369') and sbr.recordyear =2019 and it.recordyear =2019 and j.recordyear =2019
|
|
group by sbr.organizationNo,sbr.businessTypeNo,sbr.businessType ,sbr.isCount
|
|
order by sbr.businessTypeNo;
|
|
|
|
--培训机构毕业
|
|
SELECT sum(K+L+M) as biyeNo
|
|
from schoolBusinessRelation sbr
|
|
inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno
|
|
inner join Z351 as j on j.instanceid =it.instanceid and DID in (5,6,7,12,15)
|
|
where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('361','362','363','364','365','368','369') and sbr.recordyear =2019 and it.recordyear =2019 and j.recordyear =2019
|
|
|
|
; |