select * from (2 L# c$ O0 |4 Q2 g' h- N. r0 e
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area1 J) U6 h1 N! a, U
from admissions_data_info
* G) N" n8 z0 a; [6 R$ Ugroup by business_year,area
) `. G- a- b, w( x" E R" B! u) bunion all6 S. Q3 b0 c* d. W+ p" m. K3 }
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area0 R1 R. A2 M) J2 e! {& M
from admissions_data_info
8 N" c3 }9 b4 Z) B1 bgroup by business_year,area
+ b6 s+ S( X( |! K- g7 x! Dunion all0 I# |8 g* ?$ L
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
9 j' s4 G* S; q8 S1 y b* d& mfrom admissions_data_info
/ ]# R0 v! L; ?# ^: e S4 vgroup by business_year: B( x7 }0 D. l7 X
union all' g+ F- V% l# G
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
4 u7 T6 M* P7 e0 o/ Bfrom admissions_data_info
; q( U1 E1 Q/ K: jgroup by business_year
! T- z& ~, f8 p v)a# x( i5 R9 X! S( W
where area=:area# T! T% f6 W9 z. _
order by x |