select * from (
t" R( D+ O* S I. s1 D$ Uselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
- `/ z( Y' Y& O( L; z" n4 tfrom admissions_data_info
( V0 N: \# s5 H& z7 c( Bgroup by business_year,area
; t: W' e, ~3 R3 f' junion all- x8 o5 }) p0 O3 X# j3 j( L0 j6 S
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
2 r" B, W7 g& g) ]9 Pfrom admissions_data_info* H, l3 X1 _8 s2 |8 J, b
group by business_year,area9 ]2 z2 `$ u! H) U' H0 |8 @
union all
. I2 Q( g/ D" f5 Y" u/ T: b% W9 s8 V" uselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
# M4 h/ H: C1 yfrom admissions_data_info # e. K- l" }' I \9 p$ f
group by business_year
3 w8 W- z p g' l+ a& i) Uunion all* l: l# o6 c5 t* R/ M+ J# u. \( K
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area% |+ \$ a) ], {: n5 x& H
from admissions_data_info
$ j5 i# u( Y; C7 S8 O5 P* y' `+ zgroup by business_year
6 b E' d# w0 g)a
) [4 \) Y# k, ]1 dwhere area=:area
7 Q6 O/ s8 [1 ^ i" n' L# s- r1 Horder by x |