From 547804befc9631d8d1e676a3ab0f19e046267f1e Mon Sep 17 00:00:00 2001 From: wubin Date: Fri, 13 Nov 2020 10:05:18 +0800 Subject: [PATCH] update --- .../007各级各类少数民族学生数.rpx | Bin 0 -> 29545 bytes ...级各类学校少数民族学生数 .txt | 87 ++++++++++++ ...校少数民族教师、教职工数 .txt | 134 ++++++++++++++++++ 3 files changed, 221 insertions(+) create mode 100644 Report/007各级各类少数民族学生数.rpx create mode 100644 ReportSQL/007各级各类学校少数民族学生数 .txt create mode 100644 ReportSQL/008各级各类学校少数民族教师、教职工数 .txt diff --git a/Report/007各级各类少数民族学生数.rpx b/Report/007各级各类少数民族学生数.rpx new file mode 100644 index 0000000000000000000000000000000000000000..96055132b6822671f73733b38be9865ac6866cc7 GIT binary patch literal 29545 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 literal 0 HcmV?d00001 diff --git a/ReportSQL/007各级各类学校少数民族学生数 .txt b/ReportSQL/007各级各类学校少数民族学生数 .txt new file mode 100644 index 00000000..86a87427 --- /dev/null +++ b/ReportSQL/007各级各类学校少数民族学生数 .txt @@ -0,0 +1,87 @@ +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,0 as shaoshuNo +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','119') 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 ,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,0 as zaixiaoNo,sum(k+l+m+n) as shaoshuNo +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 (3) +where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('111','119') 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,0 as shaoshuNo +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,1 as schoolTypeGroupNo2,'(一)小学' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +,case when sbr.businessTypeNo='218' then 0 else 1 end as isCount,0 as zaixiaoNo, sum(j+k+l+m+n+o) as shaoshuNo +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 (3) +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,0 as shaoshuNo +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 ,2 as schoolTypeGroupNo,'二、义务教育' as schoolTypeGroup,2 as schoolTypeGroupNo2,'(二)初中阶段' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +,1 as isCount ,0 as zaixiaoNo,sum(i+j+k+l) as shaoshuNo +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 (3) +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,0 as shaoshuNo +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, 0 as zaixiaoNo,sum(I + J + K + L + M + N + O + P + Q + R + S + T + U + V) as shaoshuNo +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 in (3) +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 ,1 as schoolTypeGroupNo,'一、高中阶段' as schoolTypeGroup,1 as schoolTypeGroupNo2,'(一)普通高中' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +, sbr.isCount , sum(i+j+k) as zaixiaoNo,0 as shaoshuNo +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,1 as schoolTypeGroupNo2,'(一)普通高中' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType +, sbr.isCount , 0 as zaixiaoNo,sum(i+j+k) as shaoshuNo +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 (3) +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; + + diff --git a/ReportSQL/008各级各类学校少数民族教师、教职工数 .txt b/ReportSQL/008各级各类学校少数民族教师、教职工数 .txt new file mode 100644 index 00000000..bf657dd9 --- /dev/null +++ b/ReportSQL/008各级各类学校少数民族教师、教职工数 .txt @@ -0,0 +1,134 @@ +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=3 then sum( e+f+g+h+i) else 0 end as shaoshu_jzgNo,case when did=3 then sum(f) else 0 end as shaoshu_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,3) +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=3 then sum( e+f+g+h+i) else 0 end as shaoshu_jzgNo,case when did=3 then sum(e) else 0 end as shaoshu_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,3) +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 shaoshu_jzgNo,0 as shaoshu_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 shaoshu_jzgNo,sum(f+g+h+i+j+k+l+m+n) as shaoshu_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 (3) +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=3 then sum( e+f+g+h+i) else 0 end as shaoshu_jzgNo,case when did=3 then sum(case when sbr.businessTypeNo = '312' then 0 else e end) else 0 end as shaoshu_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,3) +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 shaoshu_jzgNo,0 as shaoshu_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 shaoshu_jzgNo,sum(f+g+h+i+j+k+l+m+n) as shaoshu_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 (12) +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=3 then sum( e+f+g+h) else 0 end as shaoshu_jzgNo,case when did=3 then sum(e) else 0 end as shaoshu_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,3) +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 +,0 as shaoshu_jzgNo,0 as shaoshu_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 +,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=3 then sum( e+f+g+h+i) else 0 end as shaoshu_jzgNo,case when did=3 then sum(case when sbr.businessTypeNo='342' then e else 0 end) else 0 end as shaoshu_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,3) +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 shaoshu_jzgNo,0 as shaoshu_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 shaoshu_jzgNo,sum(f+g+h+i+j+k+l+m+n) as shaoshu_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 (21) +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 shaoshu_jzgNo,0 as shaoshu_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 ,case when did =1 then sum(k) else 0 end as shaoshu_jzgNo,case when did =3 then sum(k) else 0 end as shaoshu_teacherNo +from schoolBusinessRelation sbr +inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno +inner join Z441 as j on j.instanceid =it.instanceid and j.did in (1,3) +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,did +order by sbr.businessTypeNo;