select * from (
8 Y! t& z0 O0 P) T; sselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area' ^6 t( @* G, P' g: M Q
from admissions_data_info
/ H5 \* i. r# B/ Ngroup by business_year,area( J0 b) ]0 c+ Z; O) ?
union all
( d2 i$ ?/ [. h! uselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
4 `- u" H1 Q" X6 }; Dfrom admissions_data_info: J- w% T3 Z1 }( E( t5 S, ^$ O$ p- g
group by business_year,area3 t7 e5 a+ k$ Q, U
union all
$ _+ e- h* x3 M' K) L p+ w8 [select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area+ X N& ?) a) s: P5 o
from admissions_data_info
- W9 C4 O+ s2 K) a+ v+ ]- c. Mgroup by business_year+ \4 [$ z# s5 c
union all
2 H$ _; y* Z) L; T, oselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
8 e7 T5 V# ^6 n5 ^+ tfrom admissions_data_info
# r1 K, n5 y$ \% G& P. v# q3 Hgroup by business_year& J, r5 V8 I/ b
)a) b: }6 Q: c, f( {; `
where area=:area
+ R4 O& G, y" k; C7 b) f$ \order by x |