select * from (
% O0 t/ d$ p9 E8 \select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
. y8 O! d3 D* T) Nfrom admissions_data_info
. f# z/ I7 x. h* v1 Mgroup by business_year,area
' F' [6 N+ m S* k! M0 f$ }union all
7 w6 [5 Q) M$ Nselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area% h) U* q8 [0 O; z
from admissions_data_info6 R4 {2 ?) U, x
group by business_year,area4 v! }: i( M" f; Z
union all' O* m" ?. p* k2 B3 m _
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area( F9 p' ?1 f h: K" o' \5 c
from admissions_data_info
1 ?1 I" G8 m: ]group by business_year
8 X, M* t2 N2 ^7 @2 c c7 [, G; r" vunion all, n4 { u. s8 h' X+ f- _3 Q
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area5 n9 v5 l: J0 Q% {2 x, f
from admissions_data_info$ R2 o- \% ~$ a5 ^
group by business_year1 I5 \- E4 j" j# D! `: |
)a
! I& `! m k- n, w% E$ y. Pwhere area=:area0 U7 r2 t: C. W) _% U0 G) W
order by x |