select * from (/ G2 _+ ]6 i- ?, `+ d
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
: O- g6 T# g2 J$ K" Z; Pfrom admissions_data_info 9 {" {5 g/ ~- y) F# ~* d/ m/ O* G
group by business_year,area3 l2 i1 b+ l7 P5 R8 H7 {/ M
union all
" n7 b7 c3 O' a5 m* t% Q: J4 p2 mselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area/ L) w6 R+ Z1 t, H" [! Y+ @4 ~
from admissions_data_info
8 b; J/ O) g" b/ x+ d* F& j5 O; Q* agroup by business_year,area/ I/ U6 ? K* I0 y: a' Q
union all7 b, f& N6 R9 p+ ^
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
0 X6 ^2 u' }) Q' z% ?9 gfrom admissions_data_info ; n( D# U$ [' _
group by business_year
Z5 b7 c, H9 E$ Kunion all3 B. c$ ?" X7 ?8 U7 U
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area9 H7 M' v, o4 B7 ~9 a9 B
from admissions_data_info" e( `7 R7 A( l) d
group by business_year0 F5 u& i+ G/ A) I
)a) l- F( y' s0 E
where area=:area5 L1 ], l9 r% l; g: Z, P6 C7 `6 i
order by x |