select * from (2 Q; B" j9 |3 y' E
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
; K& j, y- a9 m0 S5 w- @- Cfrom admissions_data_info S# M% X+ g7 a! L( V
group by business_year,area
& L6 ~4 A8 @7 D N. P: gunion all
# I3 s/ k& b; b- nselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
! H$ B3 H0 |+ Y) h0 m& cfrom admissions_data_info
: n& n3 \' m I" X: L' Sgroup by business_year,area
3 L$ f0 B% j4 \/ | xunion all. H% j7 l2 R+ j
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
8 ?, \ H' z& w% C0 gfrom admissions_data_info 5 }0 Q ?, k6 o- l ~
group by business_year
% C$ a* R1 e& E# ]9 ]union all
2 t: p% X1 H' {' g C! Cselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
( b3 B4 ~3 `* Y4 k Ffrom admissions_data_info' g7 |& F) ^9 y4 f! c
group by business_year" i, t- c/ ^+ j
)a" l5 }0 ^% T, d$ R# m
where area=:area
. ~$ k& `0 m9 g z8 H0 M2 Torder by x |