select * from ( p2 \) r& g5 Y' ?4 V
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
1 E! U* k' U: y1 |from admissions_data_info * m9 Z# G% f1 u3 g; v# ]5 j4 |2 Y7 y
group by business_year,area( s7 v2 i% b/ D" H5 L
union all
5 o9 P. W6 t" G! l8 d) y3 x' `select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
1 o* f$ X: U! j$ \( g; vfrom admissions_data_info
@8 S' \# f5 R8 y* ^+ U egroup by business_year,area' U$ ]& I. n0 I8 ^! _
union all# `1 y* n2 Y2 ]) M+ t0 f
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area2 S$ w9 ]: y7 l* c& a: l7 r6 O
from admissions_data_info - H) o+ V0 r- e" k8 t
group by business_year
- H% D. i/ H a" _" |union all
3 Z0 K+ S$ S5 e. @ ?. Xselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
8 x7 J- b& |* L* X* ufrom admissions_data_info4 p0 {, x3 w& v0 `* [( H
group by business_year: [: u. j& g1 Q2 a
)a$ N% B: N; e# P
where area=:area3 h& E. c% t4 L. l# R+ @& H
order by x |