wangshuai 5 years ago
commit 68586c487c

Binary file not shown.

@ -0,0 +1,47 @@
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(f) as zhaoshengNo,sum(i+j+k) as zaixiaoNo,sum(e) as biyeNo,sum(h) as nvNo,sum(l) as yuji_biyeNo,sum(i) as grade1,sum(j) as grade2,sum(k) as grade3
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,sbr.ownertypeno ,sbr.ownerTypeGroup ,sbr.citycountrytypeno ,sbr.cityCountryGroup,sbr.structureType,sbr.populationGroup,sbr .isnation
order by sbr.businessTypeNo;
--did
--7、残疾人
--8、随迁子女
--9、其中外省迁入
--10、本省外县迁入
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(f) as zhaoshengNo,sum(i+j+k) as zaixiaoNo,sum(e) as biyeNo,sum(h) as nvNo,sum(l) as yuji_biyeNo,sum(i) as grade1,sum(j) as grade2,sum(k) as grade3,did
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 (7,8,9,10)
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 ,did
order by sbr.businessTypeNo;
--女
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(f) as zhaoshengNo,sum(i+j+k) as zaixiaoNo,sum(e) as biyeNo,sum(h) as nvNo,sum(l) as yuji_biyeNo,sum(i) as grade1,sum(j) as grade2,sum(k) as grade3
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 (2)
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;
--少数民族
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(f) as zhaoshengNo,sum(i+j+k) as zaixiaoNo,sum(e) as biyeNo,sum(h) as nvNo,sum(l) as yuji_biyeNo,sum(i) as grade1,sum(j) as grade2,sum(k) as grade3
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,sbr.ownertypeno ,sbr.ownerTypeGroup ,sbr.citycountrytypeno ,sbr.cityCountryGroup,sbr.structureType,sbr.populationGroup,sbr .isnation
order by sbr.businessTypeNo;

@ -0,0 +1,35 @@
--全体
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( e+f+g+h+i) as jzgNo, sum(e) as teacherNo,sum(f) as teacherNo2,sum(g) as teacherNo3,sum(h) as teacherNo4,sum(i) as teacherNo5,sum(j) as teacherNo6,sum(k) as teacherNo7
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 =1
where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('311','312','321','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,sbr.ownertypeno ,sbr.ownerTypeGroup ,sbr.citycountrytypeno ,sbr.cityCountryGroup,sbr.structureType,sbr.populationGroup,sbr .isnation
order by sbr.businessTypeNo;
--女教师
SELECT sum( e+f+g+h+i) as jzgNo, sum(e) as teacherNo,sum(f) as teacherNo2,sum(g) as teacherNo3,sum(h) as teacherNo4,sum(i) as teacherNo5,sum(j) as teacherNo6,sum(k) as teacherNo7
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 =2
where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('311','312','321','341','342','345') and sbr.isLastYearCancel =0 and sbr.recordyear =2019 and it.recordyear =2019 and j.recordyear =2019
;
--少数民族
SELECT sum( e+f+g+h+i) as jzgNo, sum(e) as teacherNo,sum(f) as teacherNo2,sum(g) as teacherNo3,sum(h) as teacherNo4,sum(i) as teacherNo5,sum(j) as teacherNo6,sum(k) as teacherNo7
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 =3
where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('311','312','321','341','342','345') and sbr.isLastYearCancel =0 and sbr.recordyear =2019 and it.recordyear =2019 and j.recordyear =2019
;
--在编
SELECT sum( e+f+g+h+i) as jzgNo, sum(e) as teacherNo,sum(f) as teacherNo2,sum(g) as teacherNo3,sum(h) as teacherNo4,sum(i) as teacherNo5,sum(j) as teacherNo6,sum(k) as teacherNo7
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 =4
where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('311','312','321','341','342','345') and sbr.isLastYearCancel =0 and sbr.recordyear =2019 and it.recordyear =2019 and j.recordyear =2019
;

@ -0,0 +1,37 @@
--did
--11、女
--12、少数民族
--13、研究生毕业
--14、本科毕业
--15、专科毕业
--16、高中阶段毕业
--17、高中阶段以下毕业
select (F + G + H + I + M + N + O + P + Q + R + S + T + U + V + W + X + Y + Z + AC + AD) as teacherNO
,did
,F
,G
,H
,I
,J
,K
,L
,M
,N
,O
,P
,Q
,R
,S
,T
,U
,V
,W
,X
,Y
,Z
,AA
,AB
,AC
,AD
from j424 where did in (11,12,13,14,15,16,17)

@ -0,0 +1,14 @@
--did
--22、正高级
--23、副高级
--24、中级
--25、助理级
--26、员级
--27、未定职级
select (F + G + H + I +j+k+l+ M + N ) as teacherNO,did,F,G,H,I,J,K ,L,M ,N from j422 where did in (22,23,24,25,26,27);
--女
select (F + G + H + I +j+k+l+ M + N ) as teacherNO,did,F,G,H,I,J,K ,L,M ,N from j422 where did in (20);
--少数民族
select (F + G + H + I +j+k+l+ M + N ) as teacherNO,did,F,G,H,I,J,K ,L,M ,N from j422 where did in (21);

@ -0,0 +1,41 @@
--did
--一、教学及辅助用房 5+6+...+10
--教室 5
--实验室 6
--图书室 7
--微机室 8
--语音室 9
--体育馆 10
--二、行政办公用房 11
--其中:教师办公室 12
--三、生活用房 (14+15+...+19)
--教工宿舍 14
--其中:教师周转宿舍 15
--学生宿舍 16
--食堂 17
--厕所 18
--其他 19
--四、其他用房 20
SELECT sbr.organizationNo ,1 as schoolTypeGroupNo,'一、高中阶段' as schoolTypeGroup,1 as schoolTypeGroupNo2,'(一)普通高中' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType
,sbr.citycountrytypeno ,sbr.cityCountryGroup
, sbr.isCount , sum(F + G + H + I) as xiaosheNo,did
from schoolBusinessRelation sbr
inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno
inner join J512 as j on j.instanceid =it.instanceid and ( did in (5,6,7,8,9,10) or did in (11,12) or did in (14,16,17,18,19) or did in (20))
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,sbr.citycountrytypeno ,sbr.cityCountryGroup,did
order by sbr.businessTypeNo;
--did
--2、危房
--3、新增
SELECT sbr.organizationNo ,1 as schoolTypeGroupNo,'一、高中阶段' as schoolTypeGroup,1 as schoolTypeGroupNo2,'(一)普通高中' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType
,sbr.citycountrytypeno ,sbr.cityCountryGroup
, sbr.isCount , sum(F + G + H + I) as xiaosheNo,did
from schoolBusinessRelation sbr
inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno
inner join J512 as j on j.instanceid =it.instanceid and ( did in (2,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,sbr.citycountrytypeno ,sbr.cityCountryGroup,did
order by sbr.businessTypeNo;

@ -0,0 +1,10 @@
SELECT sbr.organizationNo ,1 as schoolTypeGroupNo,'一、高中阶段' as schoolTypeGroup,1 as schoolTypeGroupNo2,'(一)普通高中' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType
,sbr.citycountrytypeno ,sbr.cityCountryGroup
, sbr.isCount , sum(d) as d,sum(e) as e, sum(f) as f,sum(g) as g , sum(h) as h,sum(i) as i, sum(j) as j,sum(k) as k , sum(l) as l,sum(m) as m, sum(n) as n,sum(o) as o , sum(p) as p,sum(q) as q
from schoolBusinessRelation sbr
inner join instanceTable it on sbr.organizationNo =it.organizationNo and sbr.businesstypeno =it.businesstypeno
inner join J522 as j on j.instanceid =it.instanceid
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,sbr.citycountrytypeno ,sbr.cityCountryGroup
order by sbr.businessTypeNo;

@ -0,0 +1,15 @@
--keyid
--体育运动场(馆):1007
--体育器械配备:1006
--音乐器材配备:1012
--美术器材配备:1003
--理科实验仪器:1002
--校园网5001
--互联网1020
select sbr.organizationNo ,1 as schoolTypeGroupNo,'一、高中阶段' as schoolTypeGroup,1 as schoolTypeGroupNo2,'(一)普通高中' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType
,sbr.citycountrytypeno ,sbr.cityCountryGroup,sum(case when j.stringvalue='是' then 1 else 0 end) as dabiaoNo ,j.keyid
from schoolBusinessRelation sbr
inner join schoolinfo as j on j.organizationno =sbr .organizationno and keyid in ('1007','1006','1012','1003','1002','5001','1020')
where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('341','342','345' ) and sbr.isLastYearCancel =0 and sbr.recordyear =2019 and j.recordyear =2019
group by sbr.organizationNo,sbr.businessTypeNo,sbr.businessType ,sbr.isCount,sbr.citycountrytypeno ,sbr.cityCountryGroup,j.keyid
order by sbr.businessTypeNo;
Loading…
Cancel
Save