select * from (
% \0 w- L$ T, nselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
1 w. a0 A3 N; d7 h& O/ B4 Efrom admissions_data_info
1 P7 T" N5 Z& v1 ]- a( pgroup by business_year,area
9 u6 ~* A6 U1 K+ Vunion all) [. w6 e1 n6 i8 S& x' Y
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area N% j4 q3 _' A/ h
from admissions_data_info" {1 \% |5 C2 q
group by business_year,area
( J ?2 k% e. \3 {+ xunion all
# g9 L0 \, z! p/ |select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
! ~" t2 G: e2 R) b) I: A( afrom admissions_data_info
) C9 c- M. N2 U9 R0 o0 L3 pgroup by business_year: f% f. |$ X) d
union all/ z6 H }$ I0 l( z
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area- x" P' B6 M& G6 c6 t
from admissions_data_info
$ q+ |: }2 `) A% ^' hgroup by business_year: s0 G7 z$ N) J+ e& w
)a5 _8 f+ R" q" b2 d( ^
where area=:area b! m! e* t; I7 E7 Y
order by x |