select * from (3 w5 m4 D6 s, a
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area4 k3 U: m/ m$ w3 _; M7 J Z- t
from admissions_data_info
5 ^' F# K1 l7 l$ C3 g8 Egroup by business_year,area
: T1 w j7 f( H. Eunion all
, E8 C$ c5 _# b, [0 J+ w; }select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
+ D9 Z& W a" b: zfrom admissions_data_info" K1 S0 B8 q) p7 _/ t
group by business_year,area
5 T1 S1 t! S. m2 B$ ]8 x- o aunion all
7 @1 U) M: j& b5 Nselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area, M2 q# a. C0 ~; h4 c
from admissions_data_info
, s. W" ^3 O [& @- B3 @3 xgroup by business_year1 c4 d' ]: ]% Z& h0 W/ Y. Y
union all! U2 {# _, C' g6 R& ~8 O
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area! }8 W% f! F: H5 f! H! q2 }4 t
from admissions_data_info
& s# t( C3 H' K! H5 B" J1 I) Y$ lgroup by business_year- v, k* Z3 Z' {! f& K
)a8 r% N: ~% R( D0 Q+ R
where area=:area4 z: k! R; J1 F; |3 ^
order by x |