select * from ($ Z* C7 D3 b5 V8 E0 H
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
7 b; X! {0 A' Y" H" f4 ufrom admissions_data_info ! G5 j+ L+ [4 e$ s. x3 _4 S$ D
group by business_year,area: f- z$ ?" L7 t% K
union all
) S! C' g7 k p, R0 I% gselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
1 }1 }) R" b8 u1 `; y0 Gfrom admissions_data_info1 A# d' R3 I( h/ a1 _
group by business_year,area
5 G8 K8 D- v" X: d B1 A2 runion all" U0 E* |6 n! ] z/ C2 I6 u
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area+ n! ~: W. Y) T* N3 J* y
from admissions_data_info
) N! p0 ]4 ^5 t D0 d2 [group by business_year& M0 a% q, Q6 i% m% }. A/ \6 E
union all7 X1 \6 n) X* [: Z1 _
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area& v4 ]. U1 c" V! y7 ~
from admissions_data_info
9 }$ o+ I( R8 d2 n P: }. T4 C! C6 Bgroup by business_year
3 O5 E8 {$ w% Q) |6 |% u)a( D1 k5 Q; V1 A1 T6 o
where area=:area* H; g- w$ d, K6 m
order by x |