select * from (
- Z+ v) G1 b/ T, U2 u# lselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area9 C' i z$ W2 M
from admissions_data_info / B0 F# a6 u" e4 J, F' @% r! R9 W* ~
group by business_year,area9 o8 v( R6 e7 [. e. s6 _* \
union all3 l" o6 M4 P9 ~# I( G g
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area* ~/ O/ F* D) R# U" v
from admissions_data_info
3 f5 B# p) S, @" {: B: B6 ?group by business_year,area+ N6 M% G, ~+ a
union all" O0 {+ L6 l0 |* t/ c
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area3 E- U I( x3 y- {, G4 u
from admissions_data_info
$ M* ]6 J5 y$ I. d; Kgroup by business_year# } L2 D7 }1 i, d$ I1 P
union all
7 @0 h) w) j: D6 [+ M- M+ m- Rselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
7 |0 h8 G, z2 x/ @1 n% X! Rfrom admissions_data_info
' A+ l! n6 [5 H- n: J' \. U0 Ugroup by business_year6 l7 B, T: b- e# B; i0 h3 P
)a
7 M" {) D# ~) h1 G% ~8 lwhere area=:area
3 ~9 _0 k# {6 dorder by x |