select * from (
' h% [. n5 x. A9 vselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area. H( `+ \4 Q K ~& `* l
from admissions_data_info
/ d8 r V2 f' }" kgroup by business_year,area
; u( Q }7 A; Q6 O/ O; B5 X/ k+ Lunion all
2 y- q4 o( a7 J# ?9 aselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area. C! P. Z4 d; l
from admissions_data_info' U/ Y7 r! \. u; Z; m" k
group by business_year,area6 u- E' q9 [) |) _# F
union all6 W- Q. {5 A* l, P) x" [+ r4 d
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area5 y! h1 G) P4 E
from admissions_data_info 7 D$ T' u5 Y: _, a' }& H8 z9 a
group by business_year
8 d4 X/ l( T0 Y( f* f- wunion all+ t9 P* e4 B/ T1 I& [8 d$ v% i
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area( h: n+ h4 a$ G+ }
from admissions_data_info, N5 @, W% J) i2 A8 _1 K6 D
group by business_year- x' a. ]4 K6 z) D4 v H, Z
)a- m7 z# l! q& W. M+ V
where area=:area
& l& t8 {9 M" |" u6 {' |. m" Xorder by x |