diff --git a/Report/004各级各类民办学校校数、教职工、专任教师情况.rpx b/Report/003各级各类民办学校校数、教职工、专任教师情况.rpx similarity index 100% rename from Report/004各级各类民办学校校数、教职工、专任教师情况.rpx rename to Report/003各级各类民办学校校数、教职工、专任教师情况.rpx diff --git a/Report/003各级各类民办教育学生情况.rpx b/Report/004各级各类民办教育学生情况.rpx similarity index 100% rename from Report/003各级各类民办教育学生情况.rpx rename to Report/004各级各类民办教育学生情况.rpx diff --git a/Report/005各级各类学校女学生数.rpx b/Report/005各级各类学校女学生数.rpx new file mode 100644 index 00000000..c8442e31 Binary files /dev/null and b/Report/005各级各类学校女学生数.rpx differ diff --git a/Report/006各级各类学校女教师、女教职工数.rpx b/Report/006各级各类学校女教师、女教职工数.rpx new file mode 100644 index 00000000..fc907bbc Binary files /dev/null and b/Report/006各级各类学校女教师、女教职工数.rpx differ diff --git a/ReportSQL/005各级各类学校女学生数.txt b/ReportSQL/005各级各类学校女学生数.txt new file mode 100644 index 00000000..a69edcc9 --- /dev/null +++ b/ReportSQL/005各级各类学校女学生数.txt @@ -0,0 +1,89 @@ +SELECT sbr.organizationNo ,5 as schoolTypeGroupNo,'五、学前教育' as schoolTypeGroup,0 as schoolTypeGroupNo2,'' as schoolTypeGroup2,sbr.businessTypeNo,sbr.businessType +,case when sbr.businessTypeNo='111' then 1 else 0 end as isCount,sum(k+l+m+n) as zaixiaoNo,sum(j) as nvNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J311 as j on j.instanceid =it.instanceid and j.did in (5,6,7,8,9) +where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('111') 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 ,2 as schoolTypeGroupNo,'二、义务教育' as schoolTypeGroup,1 as schoolTypeGroupNo2,'(一)小学' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +,case when sbr.businessTypeNo='218' then 0 else 1 end as isCount, sum(j+k+l+m+n+o) as zaixiaoNo,sum(i) as nvNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J312 as j on j.instanceid =it.instanceid and j.did in (1,37,38,39,40,41,42,43,44,45,46,47) +where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('211','218','219','312','345') 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 ,2 as schoolTypeGroupNo,'二、义务教育' as schoolTypeGroup,2 as schoolTypeGroupNo2,'(二)初中阶段' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +,1 as isCount ,sum(i+j+k+l) as zaixiaoNo,sum(h) as nvNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J313 as j on j.instanceid =it.instanceid and j.did in (1,36,37,38,39,40,41,42,43,44) +where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('311','312','319','321','341','345') 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 ,3 as schoolTypeGroupNo,'三、特殊教育' as schoolTypeGroup,0 as schoolTypeGroupNo2,'' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +, sbr.isCount, sum(I + J + K + L + M + N + O + P + Q + R + S + T + U + V) as zaixiaoNo,sum(h) as nvNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J315 as j on j.instanceid =it.instanceid and did between 16 and 22 +where sbr.gatherRegionB ='长春市' 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 ,3 as schoolTypeGroupNo,'三、特殊教育' as schoolTypeGroup,0 as schoolTypeGroupNo2,'' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +, sbr.isCount,sum(j+k+l+m+n+o) as zaixiaoNo,sum(i) as nvNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J312 as j on j.instanceid =it.instanceid and did in(19,20,21,22,23,24,25,30,31,32,33,34,35,36) +where sbr.gatherRegionB ='长春市' 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 ,3 as schoolTypeGroupNo,'三、特殊教育' as schoolTypeGroup,0 as schoolTypeGroupNo2,'' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +, sbr.isCount,sum(i+j+k+l) as zaixiaoNo,sum(h) as nvNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J313 as j on j.instanceid =it.instanceid and did in(18,19,20,21,22,23,24,29,30,31,32,33,34,35) +where sbr.gatherRegionB ='长春市' 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 ,4 as schoolTypeGroupNo,'四、工读学校' as schoolTypeGroup,0 as schoolTypeGroupNo2,'' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +, sbr.isCount,sum(g) as zaixiaoNo,0 as nvNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J911 as j on j.instanceid =it.instanceid and j.did =1 +where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('371') 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,1 as schoolTypeGroupNo2,'(一)普通高中' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +, sbr.isCount , sum(i+j+k) as zaixiaoNo,sum(h) as nvNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J314 as j on j.instanceid =it.instanceid and did in (1,11,12,13,14,15,16,17,18,19) +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 +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 nvNo +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(m+n+o+p) as nvNo +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 (4,7,10,13,16,19) +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; diff --git a/ReportSQL/006各级各类学校女教师、女教职工数.txt b/ReportSQL/006各级各类学校女教师、女教职工数.txt new file mode 100644 index 00000000..7d2696be --- /dev/null +++ b/ReportSQL/006各级各类学校女教师、女教职工数.txt @@ -0,0 +1,138 @@ +SELECT sbr.organizationNo ,5 as schoolTypeGroupNo,'五、学前教育' as schoolTypeGroup,0 as schoolTypeGroupNo2,'' as schoolTypeGroup2,sbr.businessTypeNo,sbr.businessType +,sbr.isCount,case when did=1 then sum( e+f+g+h+i) else 0 end as jzgNo,case when did=1 then sum(f) else 0 end as teacherNo +,case when did=2 then sum( e+f+g+h+i) else 0 end as nv_jzgNo,case when did=2 then sum(f) else 0 end as nv_teacherNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J411 as j on j.instanceid =it.instanceid and j.did in (1,2) +where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('111') 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,did +order by sbr.businessTypeNo; + +SELECT sbr.organizationNo ,2 as schoolTypeGroupNo,'二、义务教育' as schoolTypeGroup,1 as schoolTypeGroupNo2,'(一)小学' as schoolTypeGroup2 ,sbr.businessTypeNo,'小学' as businessType +,case when sbr.businessTypeNo='218' then 0 else 1 end as isCount +,case when did=1 then sum( e+f+g+h+i) else 0 end as jzgNo,case when did=1 then sum(e) else 0 end as teacherNo +,case when did=2 then sum( e+f+g+h+i) else 0 end as nv_jzgNo,case when did=2 then sum(e) else 0 end as nv_teacherNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J412 as j on j.instanceid =it.instanceid and j.did in (1,2) +where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('211','218') 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,did +order by sbr.businessTypeNo; + +SELECT sbr.organizationNo ,2 as schoolTypeGroupNo,'二、义务教育' as schoolTypeGroup,1 as schoolTypeGroupNo2,'(一)小学' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +,0 as isCount , 0 as jzgNo,sum(f+g+h+i+j+k+l+m+n) as teacherNo ,0 as nv_jzgNo,0 as nv_teacherNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J422 as j on j.instanceid =it.instanceid and j.did in (4,5,6,7,8,9 ) +where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('312','345') 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 +order by sbr.businessTypeNo; + +SELECT sbr.organizationNo ,2 as schoolTypeGroupNo,'二、义务教育' as schoolTypeGroup,1 as schoolTypeGroupNo2,'(一)小学' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +,0 as isCount , 0 as jzgNo,0 as teacherNo ,0 as nv_jzgNo,sum(f+g+h+i+j+k+l+m+n) as nv_teacherNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J422 as j on j.instanceid =it.instanceid and j.did in (2 ) +where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('312','345') 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 +order by sbr.businessTypeNo; + +SELECT sbr.organizationNo ,2 as schoolTypeGroupNo,'二、义务教育' as schoolTypeGroup,2 as schoolTypeGroupNo2,'(二)初中阶段' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +,1 as isCount +,case when did=1 then sum( e+f+g+h+i) else 0 end as jzgNo,case when did=1 then sum(case when sbr.businessTypeNo = '312' then 0 else e end) else 0 end as teacherNo +,case when did=2 then sum( e+f+g+h+i) else 0 end as nv_jzgNo,case when did=2 then sum(case when sbr.businessTypeNo = '312' then 0 else e end) else 0 end as nv_teacherNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J412 as j on j.instanceid =it.instanceid and j.did in (1,2) +where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('311','312','321') 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,did +order by sbr.businessTypeNo; + +SELECT sbr.organizationNo ,2 as schoolTypeGroupNo,'二、义务教育' as schoolTypeGroup,2 as schoolTypeGroupNo2,'(二)初中阶段' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +,0 as isCount ,0 as jzgNo,sum(f+g+h+i+j+k+l+m+n) as teacherNo ,0 as nv_jzgNo,0 as nv_teacherNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J422 as j on j.instanceid =it.instanceid and j.did in (13,14,15,16,17,18) +where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('312','341','345') 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 +order by sbr.businessTypeNo; + +SELECT sbr.organizationNo ,2 as schoolTypeGroupNo,'二、义务教育' as schoolTypeGroup,2 as schoolTypeGroupNo2,'(二)初中阶段' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +,0 as isCount ,0 as jzgNo,0 as teacherNo ,0 as nv_jzgNo,sum(f+g+h+i+j+k+l+m+n) as nv_teacherNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J422 as j on j.instanceid =it.instanceid and j.did in (11) +where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('312','341','345') 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 +order by sbr.businessTypeNo; + +SELECT sbr.organizationNo ,3 as schoolTypeGroupNo,'三、特殊教育' as schoolTypeGroup,0 as schoolTypeGroupNo2,'' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +, sbr.isCount +,case when did=1 then sum( e+f+g+h) else 0 end as jzgNo,case when did=1 then sum(e) else 0 end as teacherNo +,case when did=2 then sum( e+f+g+h) else 0 end as nv_jzgNo,case when did=2 then sum(e) else 0 end as nv_teacherNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J413 as j on j.instanceid =it.instanceid and j.did in (1,2) +where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('511','512','513','514') 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,did +order by sbr.businessTypeNo; + +SELECT sbr.organizationNo ,4 as schoolTypeGroupNo,'四、工读学校' as schoolTypeGroup,0 as schoolTypeGroupNo2,'' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +, sbr.isCount +,case when did=1 then sum( h) else 0 end as jzgNo,case when did=1 then sum(i) else 0 end as teacherNo +,case when did=2 then sum( h) else 0 end as nv_jzgNo,case when did=2 then sum(i) else 0 end as nv_teacherNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J911 as j on j.instanceid =it.instanceid and j.did in (1,2) +where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('371') 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,did +order by sbr.businessTypeNo; + +SELECT sbr.organizationNo ,1 as schoolTypeGroupNo,'一、高中阶段' as schoolTypeGroup,1 as schoolTypeGroupNo2,'(一)普通高中' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +, sbr.isCount ,sum( e+f+g+h+i) as jzgNo,sum(case when sbr.businessTypeNo='342' then e else 0 end) as teacherNo +,case when did=1 then sum( e+f+g+h+i) else 0 end as jzgNo,case when did=1 then sum(case when sbr.businessTypeNo='342' then e else 0 end) else 0 end as teacherNo +,case when did=2 then sum( e+f+g+h+i) else 0 end as nv_jzgNo,case when did=2 then sum(case when sbr.businessTypeNo='342' then e else 0 end) else 0 end as nv_teacherNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J412 as j on j.instanceid =it.instanceid and j.did in (1,2) +where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('341','342','345') 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,did +order by sbr.businessTypeNo; + +SELECT sbr.organizationNo ,1 as schoolTypeGroupNo,'一、高中阶段' as schoolTypeGroup,1 as schoolTypeGroupNo2,'(一)普通高中' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +, 0 as isCount ,0 as jzgNo,sum(f+g+h+i+j+k+l+m+n) as teacherNo,0 as nv_jzgNo,0 as nv_teacherNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J422 as j on j.instanceid =it.instanceid and j.did in (22,23,24,25,26,27) +where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('341','345') 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 +order by sbr.businessTypeNo; + +SELECT sbr.organizationNo ,1 as schoolTypeGroupNo,'一、高中阶段' as schoolTypeGroup,1 as schoolTypeGroupNo2,'(一)普通高中' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +, 0 as isCount ,0 as jzgNo,0 as teacherNo ,0 as nv_jzgNo,sum(f+g+h+i+j+k+l+m+n) as nv_teacherNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join J422 as j on j.instanceid =it.instanceid and j.did in (20) +where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('341','345') 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 +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(g+h+i+j+k+l) as jzgNo,sum(g) as teacherNo ,0 as nv_jzgNo,0 as nv_teacherNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join Z411 as j on j.instanceid =it.instanceid and j.did in (3,4,5,6,7) +where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('362','364','365','369','361','363') 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 +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 jzgNo,0 as teacherNo ,sum(g+h+i+j+k+l) as nv_jzgNo,sum(g) as nv_teacherNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join Z411 as j on j.instanceid =it.instanceid and j.did in (2) +where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('362','364','365','369','361','363') 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 +order by sbr.businessTypeNo; +