select * from (, O8 g& s+ @( c8 h# t# d
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area# F$ {, O w9 q! x* _( ^9 U
from admissions_data_info
/ \* G/ {& F& U1 Pgroup by business_year,area
, f, X+ v$ g: `8 U- p8 _union all* D' S# w& Q7 I1 @2 y
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area! A$ r+ k$ {0 R- p7 s
from admissions_data_info
& L) E# j% i4 v! L$ c' fgroup by business_year,area
6 `, j: N6 D- sunion all% }3 L5 E9 F& w A' h9 w9 u4 K8 ^; `
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area2 Y9 w* F7 l ^& ?! ]& e5 D+ H
from admissions_data_info
. M" u% P6 m; P! N4 \group by business_year( _1 z' ]! |- q% s' Z& b
union all
: I/ a/ l, Y- G0 m5 {5 o; dselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
5 t' g2 g& Q: N- ufrom admissions_data_info
0 f+ ?9 e" d, z9 ygroup by business_year
% _9 J! a5 j, H6 h) Z)a" D+ j& e0 C" N; \1 f
where area=:area
0 Y" i9 K5 ]7 d( c1 m+ b. Norder by x |