select * from (
8 l: o0 M7 `; o+ Bselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
A: K3 k9 L% [8 p6 V2 wfrom admissions_data_info
& C0 ~$ q0 K$ Bgroup by business_year,area
! v- j B+ n1 a7 K' wunion all
) q: f7 F9 q5 y5 V$ iselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area' Q% x3 d$ G& q% @3 |5 ?- N# r3 d
from admissions_data_info
. Z" M4 L! Z5 y% Kgroup by business_year,area) O' q4 h; q" R( R ~3 `
union all i6 i/ ?" X" G3 k; E4 Y+ a
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area% [5 [* O$ g g2 O/ c e( y
from admissions_data_info . N5 S3 i: j- @- x- p$ f# Y' B
group by business_year
2 `1 L" T4 |& R- o; k8 dunion all* Z4 D. k. W; z5 a) L$ J# X8 I
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area; R- S2 l: p$ V# }8 I
from admissions_data_info
; p# A8 x; v7 I$ C" q# P$ Rgroup by business_year6 l/ M% m4 W. x1 A% k1 F) s# m4 ^
)a
4 @- Y7 _+ \2 G9 o; B4 r3 }where area=:area; y, Z% H# J3 e0 r
order by x |