select * from (
# `/ Y/ x, p8 N+ z$ T2 N/ Pselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
2 P$ e; q+ b }* }$ Sfrom admissions_data_info
1 M. j) f/ Z& b1 h6 N% Qgroup by business_year,area+ \. t9 k# K" c' Z6 H
union all
+ V% K" ~: z( k6 Oselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area- g) c* c% [0 _ t1 N: c
from admissions_data_info, R) J, I" o4 l+ a, ?' D
group by business_year,area3 U2 T) `2 p8 n, A
union all
) p X3 |9 N3 s+ [3 p" Iselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area0 t: ?3 s# _/ J
from admissions_data_info + g9 x1 L5 z+ O% C
group by business_year- ^9 d! I' P3 R& o" G" @) q7 b
union all. I/ n! W$ y {" W0 U& q
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area1 K0 b& r. R: f: j
from admissions_data_info
' J: P: a2 ]/ E9 L& ggroup by business_year
9 y% N4 x/ W! I+ q; ~ c% B)a) |/ D1 n+ P* [- f
where area=:area! w4 `! n5 ]. G3 s5 x0 z7 a4 w" L
order by x |