select * from (* t$ z9 ]- q4 V+ P! K" G, i
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area1 z+ d* E. A7 p( {: j G& K5 w
from admissions_data_info ' |! ]; {# l* y, h
group by business_year,area
( Q/ H1 q% @! b" X3 ]6 Wunion all* m$ w( T$ W- u# L' `) r
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area7 c4 o0 p* r; I: C8 N
from admissions_data_info
: ~1 y3 n0 K/ O& {: h* q8 bgroup by business_year,area z" T& a$ [% Y3 R* L
union all
' F& V% U# ^" q# m, r- K1 k0 L+ Iselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area2 ]9 Q0 A' `* l8 L. O' V# |: Q
from admissions_data_info - Q% Y! I* A6 V7 I
group by business_year
& R5 _! A) ~+ N1 Z* j- ]) Uunion all9 P6 [; B6 G9 }3 C
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
& z+ `" P2 Z& h2 E4 T b- `* ?from admissions_data_info/ k; b9 ^* H# i- Q
group by business_year& {% _4 G+ H, T, W Z
)a( [. s1 J) ?* J. m$ |, P, `
where area=:area
3 I. Z- k, Y# }. l7 b: ]order by x |