select * from ( o) f# Y. o9 y/ M* s+ J
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area0 W9 A9 f% V5 [- t% b
from admissions_data_info . g, P. j7 N' L0 b' u! B7 H* e
group by business_year,area
' g, a3 e+ k* H# ]5 ~! Munion all0 A0 j Y% E5 j( b- Y6 n
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
/ A1 Y5 Y2 t2 t7 m2 ffrom admissions_data_info. M m, G( @2 r# w4 Z& Q) ^
group by business_year,area& K7 _( z2 v6 ^; s) U
union all
; r) \/ c. d5 Uselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area C; N+ ~9 c$ t5 u6 d
from admissions_data_info
e3 x9 f. h/ x2 s0 y. |* Vgroup by business_year
; l& d) V9 d' q* z+ x6 @7 l- Sunion all9 y! D% M. ]% L: R, n
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area* u, r: z: o% M) R, x5 A( S
from admissions_data_info2 u P: N, A0 {" ?) r
group by business_year$ ]. k4 P- T( K r
)a6 D/ `3 q) S6 a1 W) i, E
where area=:area7 T& H; v Z* G4 G3 p
order by x |