master
wubin 5 years ago
parent de77462593
commit fc083776ce

Binary file not shown.

@ -85,3 +85,23 @@ group by sbr.organizationNo,sbr.businessTypeNo,sbr.businessType ,sbr.isCount
order by sbr.businessTypeNo; order by sbr.businessTypeNo;
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(m+n+o+p) as zaixiaoNo, 0 as shaoshuNo
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 (8,17,5,11,14,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 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 , 0 as zaixiaoNo, sum(j) as shaoshuNo
from schoolBusinessRelation sbr
inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno
inner join Z342 as j on j.instanceid =it.instanceid and j.did in (3,4,5,6,7,8)
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;

@ -0,0 +1,9 @@
SELECT sbr.organizationNo ,1 as schoolTypeGroupNo,'一、高中阶段' as schoolTypeGroup,1 as schoolTypeGroupNo2,'(一)普通高中' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType
,sbr.ownertypeno ,sbr.ownerTypeGroup ,sbr.citycountrytypeno ,sbr.cityCountryGroup,sbr.structureType,sbr.populationGroup,sbr .isnation
, sbr.isCount , sum(l+m+n) as classNo
from schoolBusinessRelation sbr
inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno
inner join J213 as j on j.instanceid =it.instanceid
where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('341','342','345','349') and sbr.isLastYearCancel =0 and sbr.recordyear =2019 and it.recordyear =2019 and j.recordyear =2019
group by sbr.organizationNo,sbr.businessTypeNo,sbr.businessType ,sbr.isCount,sbr.ownertypeno ,sbr.ownerTypeGroup ,sbr.citycountrytypeno ,sbr.cityCountryGroup,sbr.structureType,sbr.populationGroup,sbr .isnation
order by sbr.businessTypeNo;

@ -0,0 +1,25 @@
union all
--高中
order by schoolTypeGroupNo,schoolTypeGroupNo2,
case
when businessType ='高级中学' then 1
when businessType ='完全中学' then 2
when businessType ='十二年一贯制学校' then 3
when businessType ='中等技术学校' then 4
when businessType ='成人中等专业学校' then 5
when businessType ='职业高中学校' then 6
when businessType ='其他机构(班)' then 7
end
--义务
order by schoolTypeGroupNo,schoolTypeGroupNo2,
case
when businessType ='小学' then 1
when businessType ='初级中学' then 2
when businessType ='职业初中' then 3
when businessType ='九年一贯制学校' then 4
when businessType ='十二年一贯制学校' then 5
when businessType ='完全中学' then 6
end
Loading…
Cancel
Save