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/县区/029特殊教育学校办学条件(一).txt

25 lines
1.2 KiB

--did
--一、教学及辅助用房 sum(5-9)
--普通教室 5
--专用教室 6
--实验室 7
--微机室 8
--图书室 9
--二、行政办公用房10
--其中:教师办公室 11
--三、生活用房 12
--四、其他用房 13
--2、危房
--3、新增
SELECT sbr.organizationNo ,1 as schoolTypeGroupNo,'一、高中阶段' as schoolTypeGroup,1 as schoolTypeGroupNo2,'(一)普通高中' as schoolTypeGroup2 ,sbr.businessTypeNo,sbr.businessType
,sbr.citycountrytypeno ,sbr.cityCountryGroup,sbr.gatherregionc ,va.region_no
, 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 J513 as j on j.instanceid =it.instanceid and did in (2,3,5,6,7,8,9,10,11,12,13)
inner join v_areainfo va on va.region_name =sbr.gatherregionc
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,sbr.citycountrytypeno ,sbr.cityCountryGroup,did,sbr.gatherregionc ,va.region_no
order by sbr.businessTypeNo;