You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dsMin/ReportSQL/014普通高中办学条件(一) .txt

41 lines
2.1 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

--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;