select * from (, j8 c; b0 u" I; a% z5 }
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area5 |2 h$ D4 {7 r
from admissions_data_info
4 e/ S' k* N* l# ?6 ^7 }group by business_year,area: `7 @3 z! a1 M- Y7 }* Q D$ n0 i
union all
3 D3 H# u6 J" U8 V2 }! W- U/ ^$ @select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
1 l0 J$ m( e$ O/ ufrom admissions_data_info
) a5 \1 y9 D; zgroup by business_year,area% i" n) I3 C* W
union all/ X& ?% s3 Q, R2 Z1 b
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area5 \$ p' K C+ }4 w4 b. H6 m
from admissions_data_info 3 h, u% ~0 K' o* b; F, q
group by business_year% s8 L5 }% `4 w7 c, d: Q6 \' `
union all
% \. v" `8 Y% P3 Iselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
' `3 L3 b9 M5 Afrom admissions_data_info( Q- N, N2 ~( L7 Q- g5 Z
group by business_year/ V8 y8 j9 V# G" L+ g$ j8 v
)a
2 g N7 T* T$ `" @. H' M* \where area=:area
5 x) _8 G$ M3 x( \3 Porder by x |