select * from (& A1 V5 L- ]1 b+ F/ x4 r. t
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area' t; {, S0 U, t6 |$ |$ E# [
from admissions_data_info
W: T- C0 G) r rgroup by business_year,area
* q# }, y& R* U* g! O1 munion all7 Z8 V# C# O" s
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area, ~' E( Y& _# P; k& _7 P
from admissions_data_info8 h! U" u2 u# i) e% u
group by business_year,area
" o h. F/ u5 a4 m/ E& Aunion all
: ^& j* A( L. @. A& x1 S' z1 Xselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
, t% v+ @( _0 k2 I5 g+ gfrom admissions_data_info
1 `+ j9 {( p$ u5 c1 Mgroup by business_year; g7 t6 A. B5 U
union all: D/ [ U0 S; G9 Q
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
6 t, ~% r9 G% O* H# Sfrom admissions_data_info0 r, j) L1 T- }: y' o+ h
group by business_year. D2 ]1 h5 w) Q1 g' f. p
)a: l8 ~3 G. Y* b/ Y: G
where area=:area$ M3 O( \- i$ v& @! C3 p s
order by x |