select * from (7 i0 D9 g! X+ O6 A, {
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
2 r- i: E: }5 m- x5 @ \2 Q* gfrom admissions_data_info ! ?- o0 ?9 Z/ S/ } ?! ?
group by business_year,area
- `! M% m! X4 l- p1 N, ]/ L/ @union all
0 P+ ]( }7 P' L0 o0 [) y% S u9 bselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
: q! Z! K# H* x/ L; A: zfrom admissions_data_info& f5 J" b, s0 Y" S2 J+ ]) u/ U U
group by business_year,area J8 v2 Q5 c0 g" I+ h) o8 n. z
union all) y$ k2 x" T- H# e3 `5 v" I
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area2 S! v4 d& d) k- l5 F2 E/ X1 ~
from admissions_data_info
. I" s, n0 v9 D Lgroup by business_year
! I6 S' w" l/ q/ ?# Kunion all
/ T6 w I6 e% _* j$ v$ g7 e; I. ~9 k6 rselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area, }0 D) S- @% d/ c
from admissions_data_info
5 S8 s; m6 n% g- K" _# Rgroup by business_year% ]" h y. Z% n2 z8 q3 t
)a
( ]. O+ f& \ m# i( c2 j8 Owhere area=:area
2 _' j9 r8 g" Y0 r' iorder by x |