select * from (4 N# [8 f# Z, w7 f" R0 c
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
0 w- r% W+ D. m) d: xfrom admissions_data_info
4 \+ w) M1 p i, g! u& @& Wgroup by business_year,area! }, {5 j6 F8 o
union all; ? |) W, P* W# M
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
3 t! ?6 [! i9 _: }, Sfrom admissions_data_info% w! ?2 d/ U H( `3 w" C
group by business_year,area y. {; Q. H0 l5 P c& j! `
union all5 i* {+ e! C2 {! t- w* B3 ~! i
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
7 [: C) [+ f7 X/ h bfrom admissions_data_info
, r- W7 H" Z5 x: x2 W+ F! R5 Xgroup by business_year
0 \! Z3 H- t" Q" n" hunion all
% N! q6 e0 I& ^' [9 t- p9 kselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area' Y8 O; d! q, U, F3 G# c7 F8 d
from admissions_data_info) R" M1 q' w; m& l- Y
group by business_year
) O. K) A @; ~2 {- F)a
% J; X, D4 N0 I2 Wwhere area=:area" y8 k$ g8 n" d
order by x |