parent
1253835f25
commit
bd955d3777
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,10 @@
|
||||
|
||||
SELECT sbr.organizationNo ,2 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('211') 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,36 @@
|
||||
--did
|
||||
--一、教学及辅助用房 sum(5,6,7,8,9)
|
||||
--活动室 5
|
||||
--卫生间 6
|
||||
--睡眠室 7
|
||||
--保健室 8
|
||||
--图书室 9
|
||||
--二、行政办公用房 10
|
||||
--其中:教师办公室 11
|
||||
--三、生活用房 12
|
||||
--其中:厨房 13
|
||||
--四、其他用房 14
|
||||
|
||||
SELECT sbr.organizationNo ,5 as schoolTypeGroupNo,'五、学前教育' as schoolTypeGroup,0 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 J511 as j on j.instanceid =it.instanceid and ( did in (5,6,7,8,9) or did in (10,12,14))
|
||||
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,sbr.citycountrytypeno ,sbr.cityCountryGroup,did
|
||||
order by sbr.businessTypeNo;
|
||||
|
||||
|
||||
--did
|
||||
--2、危房
|
||||
--3、新增
|
||||
SELECT sbr.organizationNo ,5 as schoolTypeGroupNo,'五、学前教育' as schoolTypeGroup,0 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 J511 as j on j.instanceid =it.instanceid and ( did in (2,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,sbr.citycountrytypeno ,sbr.cityCountryGroup,did
|
||||
order by sbr.businessTypeNo;
|
Loading…
Reference in new issue