select * from (3 V" Y/ z" f. ~9 U, M, ^
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area% l! @( v$ L$ `# n2 y) k
from admissions_data_info
9 K8 h7 s) L5 U( f L' p3 H$ mgroup by business_year,area
9 [8 x; _, J$ P- Tunion all
+ G$ p. F4 s }. ?; Uselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
$ q# V# x% @" }7 p! nfrom admissions_data_info
1 E3 C( r, U+ ]$ v) I: Q% \group by business_year,area/ e ?5 M( b n2 p- x
union all
+ S/ z4 a( M0 u- L3 e/ u3 n: N# r% J. nselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area- C) l! C" ~" c/ B0 U4 G4 T
from admissions_data_info
3 h# o' c+ r' I# V8 \$ S: ^, Hgroup by business_year
4 I, F0 J( a3 gunion all( u9 l8 k# g; x! I- s0 o
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area- A- F! {3 E" z% I) i
from admissions_data_info0 A; i: D" a+ j
group by business_year5 @7 R+ I% m; i5 f1 e
)a
8 U2 W- t2 A' q; }where area=:area- C$ ~7 I8 V2 A7 X- g
order by x |