select * from (; Q8 h: V! s# y# ]: {5 z
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area6 k& a& \, L# l: U& ~3 M7 e1 U2 h
from admissions_data_info ! _2 _$ [$ K. H% V0 U/ S5 @
group by business_year,area
7 V- q6 d1 F; }' U. Qunion all
& F7 X0 N* S4 Hselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
( s8 A, H7 h1 E! N& T; \9 ufrom admissions_data_info$ U3 u- w" c* {; g
group by business_year,area: A6 C6 E. W; v" ^% W
union all# Y0 a- _# ^: z# n8 T
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area: N0 v8 ?1 X% `, h! k
from admissions_data_info
/ P1 x8 h6 P9 Bgroup by business_year' ?! ` S9 Y# }- V' ^ q" J4 e% u i
union all% h8 f! `6 E' B* e- j
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area7 P2 T0 k! m8 k- D8 w4 c
from admissions_data_info
4 R1 y2 E, C2 b( {& }group by business_year- O( @4 i& s! c- x' L+ O2 K
)a
7 ], [0 ~+ z; `# cwhere area=:area
1 F3 s/ v2 G) n- Q) `order by x |