select * from (
% ]5 b* g4 u6 B1 lselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
/ \/ J2 |* r3 C% ~) a% l$ kfrom admissions_data_info
: v& x3 x3 M; l7 C/ t9 t2 Sgroup by business_year,area6 m0 {2 [1 p; R. Q/ O. H
union all
5 J6 H" N. O: P$ Tselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area A% t' F; V7 r. ]* A% W( \
from admissions_data_info3 m: G2 R5 n7 Q5 o, z
group by business_year,area. c7 Y: y- q7 ~- g: L
union all: ]" C4 V' k5 D# |. v" a% b
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
. L% I. F+ H# W4 j g. vfrom admissions_data_info
2 U @. a) e& j. ugroup by business_year% U1 t1 N) \ u: D, D
union all
4 D" {( W- l7 B! o$ l$ O4 rselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
9 _( ]2 a. A3 R- \8 M* cfrom admissions_data_info% b9 F7 t( z) @6 d7 [/ m7 m* D
group by business_year, D1 H0 s1 O( L9 Q* C+ ~$ e. J6 G! x, Q' _
)a
) c% c c8 j1 u$ z0 R1 v2 ?+ Twhere area=:area
( v+ }& A3 |* corder by x |