parent
863d18867e
commit
04670f8036
@ -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 * from mv_db_zrjsxlqk
|
||||
SELECT stage,didgroup,teacherno AS total FROM mv_db_zrjsxlqk 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_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_zrjszcqk 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