Merge branch 'master' of http://10.10.14.250:3000/huanghai/dsMin
commit
7951cdadb0
@ -0,0 +1 @@
|
||||
select t1.stage,t1.gatherregionc,t1.didgroup,t1.sum as total,t2.sum as teacherno from mv_db_base_zrjsxl_area t1 INNER JOIN mv_db_base_student_area t2 on t1.stage=t2.stage and t1.gatherregionc=t2.gatherregionc order by case when t1.stage='小学' then 1 when t1.stage='初中' then 2 when t1.stage='高中' then 3 end,case when t1.gatherregionc='南关区' then 1 when t1.gatherregionc='宽城区' then 2 when t1.gatherregionc='朝阳区' then 3 when t1.gatherregionc='二道区' then 4 when t1.gatherregionc='绿园区' then 5 when t1.gatherregionc='双阳区' then 6 when t1.gatherregionc='九台区' then 7 when t1.gatherregionc='直属代管' then 8 when t1.gatherregionc='新区代管' then 9 when t1.gatherregionc='经开区代管' then 10 when t1.gatherregionc='净月区代管' then 11 when t1.gatherregionc='汽车区代管' then 12 when t1.gatherregionc='省属代管' then 13 when t1.gatherregionc='莲花山度假区代管' then 14 when t1.gatherregionc='农安县' then 15 when t1.gatherregionc='榆树市' then 16 when t1.gatherregionc='德惠市' then 17 end,case when t1.didgroup='研究生毕业' then 1 when t1.didgroup='本科毕业' then 2 when t1.didgroup='专科毕业' then 3 when t1.didgroup='高中阶段毕业' then 4 when t1.didgroup='高中阶段以下毕业' then 5 end
|
@ -0,0 +1 @@
|
||||
select t1.stage,t1.gatherregionc,t1.didgroup,t1.total,t2.sum as teacherno from mv_db_base_zrjsnl_area t1 INNER JOIN mv_db_base_student_area t2 on t1.stage=t2.stage and t1.gatherregionc=t2.gatherregionc order by case when t1.stage='小学' then 1 when t1.stage='初中' then 2 when t1.stage='高中' then 3 end,case when t1.gatherregionc='南关区' then 1 when t1.gatherregionc='宽城区' then 2 when t1.gatherregionc='朝阳区' then 3 when t1.gatherregionc='二道区' then 4 when t1.gatherregionc='绿园区' then 5 when t1.gatherregionc='双阳区' then 6 when t1.gatherregionc='九台区' then 7 when t1.gatherregionc='直属代管' then 8 when t1.gatherregionc='新区代管' then 9 when t1.gatherregionc='经开区代管' then 10 when t1.gatherregionc='净月区代管' then 11 when t1.gatherregionc='汽车区代管' then 12 when t1.gatherregionc='省属代管' then 13 when t1.gatherregionc='莲花山度假区代管' then 14 when t1.gatherregionc='农安县' then 15 when t1.gatherregionc='榆树市' then 16 when t1.gatherregionc='德惠市' then 17 end,case when t1.didgroup='24岁及以下' then 1 when t1.didgroup='25-29岁' then 2 when t1.didgroup='30-34岁' then 3 when t1.didgroup='35-39岁' then 4 when t1.didgroup='40-44岁' then 5 when t1.didgroup='45-49岁' then 6 when t1.didgroup='50-54岁' then 7 when t1.didgroup='55-59岁' then 8 when t1.didgroup='60岁及以上' then 9 end
|
@ -0,0 +1 @@
|
||||
select * from mv_db_base_zhuanrenjiaoshi_area order by case when stage='小学' then 1 when stage='初中' then 2 when stage='高中' then 3 end,case when gatherregionc='南关区' then 1 when gatherregionc='宽城区' then 2 when gatherregionc='朝阳区' then 3 when gatherregionc='二道区' then 4 when gatherregionc='绿园区' then 5 when gatherregionc='双阳区' then 6 when gatherregionc='九台区' then 7 when gatherregionc='直属代管' then 8 when gatherregionc='新区代管' then 9 when gatherregionc='经开区代管' then 10 when gatherregionc='净月区代管' then 11 when gatherregionc='汽车区代管' then 12 when gatherregionc='省属代管' then 13 when gatherregionc='莲花山度假区代管' then 14 when gatherregionc='农安县' then 15 when gatherregionc='榆树市' then 16 when gatherregionc='德惠市' then 17 end
|
@ -0,0 +1 @@
|
||||
select t1.stage,t1.gatherregionc,t1.didgroup,t1.sum as total,t2.sum as teacherno from mv_db_base_zrjszc_area t1 INNER JOIN mv_db_base_student_area t2 on t1.stage=t2.stage and t1.gatherregionc=t2.gatherregionc order by case when t1.stage='小学' then 1 when t1.stage='初中' then 2 when t1.stage='高中' then 3 end,case when t1.gatherregionc='南关区' then 1 when t1.gatherregionc='宽城区' then 2 when t1.gatherregionc='朝阳区' then 3 when t1.gatherregionc='二道区' then 4 when t1.gatherregionc='绿园区' then 5 when t1.gatherregionc='双阳区' then 6 when t1.gatherregionc='九台区' then 7 when t1.gatherregionc='直属代管' then 8 when t1.gatherregionc='新区代管' then 9 when t1.gatherregionc='经开区代管' then 10 when t1.gatherregionc='净月区代管' then 11 when t1.gatherregionc='汽车区代管' then 12 when t1.gatherregionc='省属代管' then 13 when t1.gatherregionc='莲花山度假区代管' then 14 when t1.gatherregionc='农安县' then 15 when t1.gatherregionc='榆树市' then 16 when t1.gatherregionc='德惠市' then 17 end,case when t1.didgroup='正高级' then 1 when t1.didgroup='副高级' then 2 when t1.didgroup='中级' then 3 when t1.didgroup='助理级' then 4 when t1.didgroup='员级' then 5 when t1.didgroup='未定职级' then 6 end
|
@ -0,0 +1 @@
|
||||
select t1.stage,t1.gatherregionc,t1.sum as total,t2.sum as studentno from mv_db_base_jiaofu_area t1 INNER JOIN mv_db_base_student_area t2 on t1.stage=t2.stage and t1.gatherregionc=t2.gatherregionc order by case when t1.stage='小学' then 1 when t1.stage='初中' then 2 when t1.stage='高中' then 3 end,case when t1.gatherregionc='南关区' then 1 when t1.gatherregionc='宽城区' then 2 when t1.gatherregionc='朝阳区' then 3 when t1.gatherregionc='二道区' then 4 when t1.gatherregionc='绿园区' then 5 when t1.gatherregionc='双阳区' then 6 when t1.gatherregionc='九台区' then 7 when t1.gatherregionc='直属代管' then 8 when t1.gatherregionc='新区代管' then 9 when t1.gatherregionc='经开区代管' then 10 when t1.gatherregionc='净月区代管' then 11 when t1.gatherregionc='汽车区代管' then 12 when t1.gatherregionc='省属代管' then 13 when t1.gatherregionc='莲花山度假区代管' then 14 when t1.gatherregionc='农安县' then 15 when t1.gatherregionc='榆树市' then 16 when t1.gatherregionc='德惠市' then 17 end
|
@ -0,0 +1 @@
|
||||
select t1.stage,t1.gatherregionc,t1.sum as total,t2.sum as studentno from mv_db_base_zhandimianji_area t1 INNER JOIN mv_db_base_student_area t2 on t1.stage=t2.stage and t1.gatherregionc=t2.gatherregionc order by case when t1.stage='小学' then 1 when t1.stage='初中' then 2 when t1.stage='高中' then 3 end,case when t1.gatherregionc='南关区' then 1 when t1.gatherregionc='宽城区' then 2 when t1.gatherregionc='朝阳区' then 3 when t1.gatherregionc='二道区' then 4 when t1.gatherregionc='绿园区' then 5 when t1.gatherregionc='双阳区' then 6 when t1.gatherregionc='九台区' then 7 when t1.gatherregionc='直属代管' then 8 when t1.gatherregionc='新区代管' then 9 when t1.gatherregionc='经开区代管' then 10 when t1.gatherregionc='净月区代管' then 11 when t1.gatherregionc='汽车区代管' then 12 when t1.gatherregionc='省属代管' then 13 when t1.gatherregionc='莲花山度假区代管' then 14 when t1.gatherregionc='农安县' then 15 when t1.gatherregionc='榆树市' then 16 when t1.gatherregionc='德惠市' then 17 end
|
@ -0,0 +1 @@
|
||||
select t1.stage,t1.gatherregionc,t1.sum as total,t2.sum as studentno from mv_db_base_xueshengsushe_area t1 INNER JOIN mv_db_base_jss_area t2 on t1.stage=t2.stage and t1.gatherregionc=t2.gatherregionc order by case when t1.stage='小学' then 1 when t1.stage='初中' then 2 when t1.stage='高中' then 3 end,case when t1.gatherregionc='南关区' then 1 when t1.gatherregionc='宽城区' then 2 when t1.gatherregionc='朝阳区' then 3 when t1.gatherregionc='二道区' then 4 when t1.gatherregionc='绿园区' then 5 when t1.gatherregionc='双阳区' then 6 when t1.gatherregionc='九台区' then 7 when t1.gatherregionc='直属代管' then 8 when t1.gatherregionc='新区代管' then 9 when t1.gatherregionc='经开区代管' then 10 when t1.gatherregionc='净月区代管' then 11 when t1.gatherregionc='汽车区代管' then 12 when t1.gatherregionc='省属代管' then 13 when t1.gatherregionc='莲花山度假区代管' then 14 when t1.gatherregionc='农安县' then 15 when t1.gatherregionc='榆树市' then 16 when t1.gatherregionc='德惠市' then 17 end
|
@ -0,0 +1 @@
|
||||
select t1.stage,t1.gatherregionc,t1.sum as total,t2.sum as studentno from mv_db_base_yundongchangdi_area t1 INNER JOIN mv_db_base_student_area t2 on t1.stage=t2.stage and t1.gatherregionc=t2.gatherregionc order by case when t1.stage='小学' then 1 when t1.stage='初中' then 2 when t1.stage='高中' then 3 end,case when t1.gatherregionc='南关区' then 1 when t1.gatherregionc='宽城区' then 2 when t1.gatherregionc='朝阳区' then 3 when t1.gatherregionc='二道区' then 4 when t1.gatherregionc='绿园区' then 5 when t1.gatherregionc='双阳区' then 6 when t1.gatherregionc='九台区' then 7 when t1.gatherregionc='直属代管' then 8 when t1.gatherregionc='新区代管' then 9 when t1.gatherregionc='经开区代管' then 10 when t1.gatherregionc='净月区代管' then 11 when t1.gatherregionc='汽车区代管' then 12 when t1.gatherregionc='省属代管' then 13 when t1.gatherregionc='莲花山度假区代管' then 14 when t1.gatherregionc='农安县' then 15 when t1.gatherregionc='榆树市' then 16 when t1.gatherregionc='德惠市' then 17 end
|
@ -0,0 +1 @@
|
||||
select t1.stage,t1.gatherregionc,t1.sum as total,t2.sum as studentno from mv_db_base_jss_area t1 INNER JOIN mv_db_base_student_area t2 on t1.stage=t2.stage and t1.gatherregionc=t2.gatherregionc order by case when t1.stage='小学' then 1 when t1.stage='初中' then 2 when t1.stage='高中' then 3 end,case when t1.gatherregionc='南关区' then 1 when t1.gatherregionc='宽城区' then 2 when t1.gatherregionc='朝阳区' then 3 when t1.gatherregionc='二道区' then 4 when t1.gatherregionc='绿园区' then 5 when t1.gatherregionc='双阳区' then 6 when t1.gatherregionc='九台区' then 7 when t1.gatherregionc='直属代管' then 8 when t1.gatherregionc='新区代管' then 9 when t1.gatherregionc='经开区代管' then 10 when t1.gatherregionc='净月区代管' then 11 when t1.gatherregionc='汽车区代管' then 12 when t1.gatherregionc='省属代管' then 13 when t1.gatherregionc='莲花山度假区代管' then 14 when t1.gatherregionc='农安县' then 15 when t1.gatherregionc='榆树市' then 16 when t1.gatherregionc='德惠市' then 17 end
|
@ -0,0 +1 @@
|
||||
select t1.stage,t1.gatherregionc,t1.didgroup,t1.total as classno,t2.total from mv_db_base_yichangbaner_area t1 INNER JOIN mv_db_base_classcount_area t2 on t1.stage=t2.stage and t1.gatherregionc=t2.gatherregionc order by case when t1.stage='小学' then 1 when t1.stage='初中' then 2 when t1.stage='高中' then 3 end,case when t1.gatherregionc='南关区' then 1 when t1.gatherregionc='宽城区' then 2 when t1.gatherregionc='朝阳区' then 3 when t1.gatherregionc='二道区' then 4 when t1.gatherregionc='绿园区' then 5 when t1.gatherregionc='双阳区' then 6 when t1.gatherregionc='九台区' then 7 when t1.gatherregionc='直属代管' then 8 when t1.gatherregionc='新区代管' then 9 when t1.gatherregionc='经开区代管' then 10 when t1.gatherregionc='净月区代管' then 11 when t1.gatherregionc='汽车区代管' then 12 when t1.gatherregionc='省属代管' then 13 when t1.gatherregionc='莲花山度假区代管' then 14 when t1.gatherregionc='农安县' then 15 when t1.gatherregionc='榆树市' then 16 when t1.gatherregionc='德惠市' then 17 end,case when didgroup='小班额' then 1 when didgroup='大班额' then 2 when didgroup='超大班额' then 3 end;
|
@ -0,0 +1 @@
|
||||
select t1.stage,t1.gatherregionc,t1.sum as total,t2.sum as studentno from mv_db_base_lset_area t1 INNER JOIN mv_db_base_student_area t2 on t1.stage=t2.stage and t1.gatherregionc=t2.gatherregionc order by case when t1.stage='小学' then 1 when t1.stage='初中' then 2 when t1.stage='高中' then 3 end,case when t1.gatherregionc='南关区' then 1 when t1.gatherregionc='宽城区' then 2 when t1.gatherregionc='朝阳区' then 3 when t1.gatherregionc='二道区' then 4 when t1.gatherregionc='绿园区' then 5 when t1.gatherregionc='双阳区' then 6 when t1.gatherregionc='九台区' then 7 when t1.gatherregionc='直属代管' then 8 when t1.gatherregionc='新区代管' then 9 when t1.gatherregionc='经开区代管' then 10 when t1.gatherregionc='净月区代管' then 11 when t1.gatherregionc='汽车区代管' then 12 when t1.gatherregionc='省属代管' then 13 when t1.gatherregionc='莲花山度假区代管' then 14 when t1.gatherregionc='农安县' then 15 when t1.gatherregionc='榆树市' then 16 when t1.gatherregionc='德惠市' then 17 end
|
@ -0,0 +1 @@
|
||||
SELECT t1.stage,t1.gatherregionc,t1.didgroup,t1.sum as total,t2.sum as studentno FROM mv_db_base_sqzn_area t1 INNER JOIN mv_db_base_student_area t2 on t1.stage=t2.stage and t1.gatherregionc=t2.gatherregionc order by case when t1.stage='小学' then 1 when t1.stage='初中' then 2 when t1.stage='高中' then 3 end,case when t1.gatherregionc='南关区' then 1 when t1.gatherregionc='宽城区' then 2 when t1.gatherregionc='朝阳区' then 3 when t1.gatherregionc='二道区' then 4 when t1.gatherregionc='绿园区' then 5 when t1.gatherregionc='双阳区' then 6 when t1.gatherregionc='九台区' then 7 when t1.gatherregionc='直属代管' then 8 when t1.gatherregionc='新区代管' then 9 when t1.gatherregionc='经开区代管' then 10 when t1.gatherregionc='净月区代管' then 11 when t1.gatherregionc='汽车区代管' then 12 when t1.gatherregionc='省属代管' then 13 when t1.gatherregionc='莲花山度假区代管' then 14 when t1.gatherregionc='农安县' then 15 when t1.gatherregionc='榆树市' then 16 when t1.gatherregionc='德惠市' then 17 end,case when didgroup='外省迁入' then 1 when didgroup='本省外县迁入' then 2 end
|
@ -0,0 +1 @@
|
||||
select gatherregionc,stage,count as total from mv_db_base_school_area order by case when gatherregionc='南关区' then 1 when gatherregionc='宽城区' then 2 when gatherregionc='朝阳区' then 3 when gatherregionc='二道区' then 4 when gatherregionc='绿园区' then 5 when gatherregionc='双阳区' then 6 when gatherregionc='九台区' then 7 when gatherregionc='直属代管' then 8 when gatherregionc='新区代管' then 9 when gatherregionc='经开区代管' then 10 when gatherregionc='净月区代管' then 11 when gatherregionc='汽车区代管' then 12 when gatherregionc='省属代管' then 13 when gatherregionc='莲花山度假区代管' then 14 when gatherregionc='农安县' then 15 when gatherregionc='榆树市' then 16 when gatherregionc='德惠市' then 17 end,case when stage='小学' then 1 when stage='初级中学' then 2 when stage='九年一贯制学校' then 3 when stage='高级中学' then 4 when stage='完全中学' then 5 when stage='十二年一贯制学校' then 6 end
|
@ -0,0 +1 @@
|
||||
select '学校总数' as didgroup,sum(count) as total from mv_db_base_school union all select '教工总数' as didgroup,jzgno as total from mv_db_base_jiaozhigong union all select '学生总数' as didgroup,sum(zaixiaono) as total from mv_db_base_student
|
@ -1,5 +1 @@
|
||||
select t1.stage,sum(t1.zhaoshengno) as zhaoshengno,sum(t1.biyeno) as biyeno,sum(t1.zaixiaono) as zaixiaono from mv_db_base_student as t1 GROUP BY t1.stage order by
|
||||
(case when t1.stage='小学' then 1
|
||||
when t1.stage='初中' then 2
|
||||
when t1.stage='高中' then 3
|
||||
end)
|
||||
select * from (select stage,unnest(array['招生数', '在校生数', '毕业生数']) AS didgroup, unnest(array[sum(zhaoshengno) ,sum(zaixiaono),sum(biyeno)]) as total from mv_db_base_student GROUP BY stage ) t order by case when stage='小学' then 1 when stage='初中' then 2 when stage='高中' then 3 end,case when didgroup='招生数' then 1 when didgroup='在校生数' then 2 when didgroup='高中' then 3 end
|
@ -1,9 +1 @@
|
||||
select stage,didgroup,sum(zaixiaono) as total from mv_db_sqznqk GROUP BY didgroup,stage
|
||||
order by
|
||||
(case when stage='小学' then 1
|
||||
when stage='初中' then 2
|
||||
when stage='高中' then 3
|
||||
end)
|
||||
|
||||
|
||||
select sum(zaixiaono) as total from mv_db_base_student
|
||||
select * from (select stage,didgroup,sum(zaixiaono) as total from mv_db_sqznqk GROUP BY didgroup,stage union all select '小学' as stage,'在校生' as didgroup, sum(zaixiaono) as total from mv_db_base_student where stage='小学' union all select '初中' as stage,'在校生' as didgroup, sum(zaixiaono) as total from mv_db_base_student where stage='初中' union all select '高中' as stage,'在校生' as didgroup, sum(zaixiaono) as total from mv_db_base_student where stage='高中') t order by case when stage='小学' then 1 when stage='初中' then 2 when stage='高中' then 3 end,case when didgroup='本省外县迁入' then 1 when didgroup='外省迁入' then 2 when didgroup='在校生' then 3 end
|
@ -1 +1 @@
|
||||
select stage,citycountrygroup,zhandimianjino from mv_db_base_banxuetiaojian
|
||||
select stage,citycountrygroup,zhandimianjino as total from mv_db_base_banxuetiaojian ORDER BY CASE WHEN stage = '小学' THEN 1 WHEN stage = '初中' THEN 2 WHEN stage = '高中' THEN 3 END,CASE WHEN citycountrygroup = '城区' THEN 1 WHEN citycountrygroup = '镇区' THEN 2 WHEN citycountrygroup = '乡村' THEN 3 END
|
@ -1,4 +1 @@
|
||||
--寄宿生
|
||||
select stage,citycountrygroup,jisuno from mv_db_base_student
|
||||
--宿舍面积
|
||||
select stage,citycountrygroup,xueshengsushe from mv_db_base_banxuetiaojian
|
||||
select t1.stage,t1.citycountrygroup,t1.jisuno,t2.xueshengsushe from mv_db_base_student t1 inner join mv_db_base_banxuetiaojian t2 on t1.stage=t2.stage and t1.citycountrygroup=t2.citycountrygroup ORDER BY CASE WHEN t1.stage = '小学' THEN 1 WHEN t1.stage = '初中' THEN 2 WHEN t1.stage = '高中' THEN 3 END,CASE WHEN t1.citycountrygroup = '城区' THEN 1 WHEN t1.citycountrygroup = '镇区' THEN 2 WHEN t1.citycountrygroup = '乡村' THEN 3 END
|
@ -1 +1 @@
|
||||
select stage,citycountrygroup,jiaoxuejiaofuno from mv_db_base_banxuetiaojian
|
||||
select stage,citycountrygroup,jiaoxuejiaofuno as total from mv_db_base_banxuetiaojian ORDER BY CASE WHEN stage = '小学' THEN 1 WHEN stage = '初中' THEN 2 WHEN stage = '高中' THEN 3 END,CASE WHEN citycountrygroup = '城区' THEN 1 WHEN citycountrygroup = '镇区' THEN 2 WHEN citycountrygroup = '乡村' THEN 3 END
|
@ -1 +1 @@
|
||||
select stage,citycountrygroup,xiaosheno from mv_db_base_banxuetiaojian
|
||||
select stage,citycountrygroup,xiaosheno as total from mv_db_base_banxuetiaojian ORDER BY CASE WHEN stage = '小学' THEN 1 WHEN stage = '初中' THEN 2 WHEN stage = '高中' THEN 3 END,CASE WHEN citycountrygroup = '城区' THEN 1 WHEN citycountrygroup = '镇区' THEN 2 WHEN citycountrygroup = '乡村' THEN 3 END
|
@ -1 +1 @@
|
||||
select stage,citycountrygroup,yundongchangdino from mv_db_base_banxuetiaojian
|
||||
select stage,citycountrygroup,yundongchangdino as total from mv_db_base_banxuetiaojian ORDER BY CASE WHEN stage = '小学' THEN 1 WHEN stage = '初中' THEN 2 WHEN stage = '高中' THEN 3 END,CASE WHEN citycountrygroup = '城区' THEN 1 WHEN citycountrygroup = '镇区' THEN 2 WHEN citycountrygroup = '乡村' THEN 3 END
|
@ -1 +1 @@
|
||||
select * from mv_db_zrjsxlqk
|
||||
SELECT stage,didgroup,teacherno AS total FROM mv_db_base_zrjsxl ORDER BY CASE WHEN stage = '小学' THEN 1 WHEN stage = '初中' THEN 2 WHEN stage = '高中' THEN 3 END,CASE WHEN didgroup = '研究生毕业' THEN 1 WHEN didgroup = '本科毕业' THEN 2 WHEN didgroup = '专科毕业' THEN 3 WHEN didgroup = '高中阶段毕业' THEN 4 WHEN didgroup = '高中阶段以下毕业' THEN 5 END
|
@ -1 +1,6 @@
|
||||
select * from mv_dp_zrjsssbl
|
||||
select * from mv_dp_zrjsssbl
|
||||
order by
|
||||
(case when stage='小学' then 1
|
||||
when stage='初中' then 2
|
||||
when stage='高中' then 3
|
||||
end)
|
||||
|
@ -1 +1 @@
|
||||
select * from mv_dp_zrjsnl
|
||||
SELECT * FROM mv_db_base_zrjsnl ORDER BY CASE WHEN stage = '小学' THEN 1 WHEN stage = '初中' THEN 2 WHEN stage = '高中' THEN 3 END,CASE WHEN didgroup = '24岁及以下' THEN 1 WHEN didgroup = '25-29岁' THEN 2 WHEN didgroup = '30-34岁' THEN 3 WHEN didgroup = '35-39岁' THEN 4 WHEN didgroup = '40-44岁' THEN 5 WHEN didgroup = '45-49岁' THEN 6 WHEN didgroup = '50-54岁' THEN 7 WHEN didgroup = '55-59岁' THEN 8 WHEN didgroup = '60岁及以上' THEN 9 END
|
@ -1 +1 @@
|
||||
select * from mv_db_zrjszcqk
|
||||
SELECT * FROM mv_db_base_zrjszc ORDER BY CASE WHEN stage = '小学' THEN 1 WHEN stage = '初中' THEN 2 WHEN stage = '高中' THEN 3 END,CASE WHEN didgroup = '正高级' THEN 1 WHEN didgroup = '副高级' THEN 2 WHEN didgroup = '中级' THEN 3 WHEN didgroup = '助理级' THEN 4 WHEN didgroup = '员级' THEN 5 WHEN didgroup = '未定职级' THEN 6 END
|
@ -1,66 +1,10 @@
|
||||
select t1.a as stage,t1.citycountrygroup,sum(c1) as studentNo,sum(c2) as teacherNo from (
|
||||
select * from (
|
||||
SELECT '小学' as a,'学生' as b,sbr.cityCountryGroup,sum(j+k+l+m+n+o) as c1,0 as c2
|
||||
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.cityCountryGroup
|
||||
|
||||
union all
|
||||
|
||||
SELECT '初中' as a,'学生' as b,sbr.cityCountryGroup,sum(i+j+k+l) as c1,0 as c2
|
||||
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','341','345') and sbr.isLastYearCancel =0 and sbr.recordyear =2019 and it.recordyear =2019 and j.recordyear =2019
|
||||
group by sbr.cityCountryGroup
|
||||
|
||||
union all
|
||||
|
||||
SELECT '高中' as a,'学生' as b,sbr.cityCountryGroup,sum(i+j+k) as c1,0 as c2
|
||||
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)
|
||||
inner join v_areainfo va on va.region_name =sbr.gatherregionc
|
||||
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.cityCountryGroup
|
||||
) as t
|
||||
|
||||
|
||||
union all
|
||||
|
||||
|
||||
select * from (
|
||||
SELECT '高中' as a ,'老师' as b ,sbr.cityCountryGroup ,0 as c1, sum (F + G + H + I +j+k+l+ M + N ) as c2
|
||||
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 did in (22,23,24,25,26,27)
|
||||
inner join v_areainfo va on va.region_name =sbr.gatherregionc
|
||||
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.cityCountryGroup
|
||||
|
||||
union all
|
||||
|
||||
|
||||
SELECT '初中' as a ,'老师' as b ,sbr.cityCountryGroup ,0 as c1, sum (F + G + H + I +j+k+l+ M + N ) as c2
|
||||
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 did in (13,14,15,16,17,18)
|
||||
inner join v_areainfo va on va.region_name =sbr.gatherregionc
|
||||
where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in('311','312','341','345') and sbr.isLastYearCancel =0 and sbr.recordyear =2019 and it.recordyear =2019 and j.recordyear =2019
|
||||
group by sbr.cityCountryGroup
|
||||
|
||||
|
||||
union all
|
||||
|
||||
SELECT '小学' as a ,'老师' as b ,sbr.cityCountryGroup ,0 as c1, sum (F + G + H + I +j+k+l+ M + N ) as c2
|
||||
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 did in (4,5,6,7,8,9)
|
||||
inner join v_areainfo va on va.region_name =sbr.gatherregionc
|
||||
where sbr.gatherRegionB ='长春市' and sbr.businessTypeNo in ('211','218','312','345') and sbr.isLastYearCancel =0 and sbr.recordyear =2019 and it.recordyear =2019 and j.recordyear =2019
|
||||
group by sbr.cityCountryGroup
|
||||
|
||||
) as t
|
||||
) as t1 group by a,citycountrygroup order by a,citycountrygroup
|
||||
select * from mv_dp_cxzrssb as t1
|
||||
order by
|
||||
(case when t1.stage='小学' then 1
|
||||
when t1.stage='初中' then 2
|
||||
when t1.stage='高中' then 3
|
||||
end),
|
||||
(case when t1.citycountrygroup='城区' then 1
|
||||
when t1.citycountrygroup='镇区' then 2
|
||||
when t1.citycountrygroup='乡村' then 3
|
||||
end)
|
@ -1,7 +1 @@
|
||||
select '教职工总人数' as title,jzgno as count from mv_db_base_jiaozhigong
|
||||
union all
|
||||
select '女教职工总人数' as title,nv_jzgno as count from mv_db_base_jiaozhigong
|
||||
union all
|
||||
select '专任教师总人数' as title,sum(teacherno) from mv_db_base_zhuanrenjiaoshi
|
||||
union all
|
||||
select '在编教师总人数' as title,count from mv_db_base_zaibian
|
||||
select '教职工总人数' as didgroup,jzgno as total from mv_db_base_jiaozhigong union all select '女教职工总人数' as didgroup,nv_jzgno as total from mv_db_base_jiaozhigong union all select '专任教师总人数' as didgroup,sum(teacherno) as total from mv_db_base_zhuanrenjiaoshi union all select '在编教师总人数' as didgroup,count as total from mv_db_base_zaibian
|
Loading…
Reference in new issue