select * from (
7 k+ ^' A9 H1 _# ~+ X7 tselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
" U+ J" {4 _! B" C4 @: Y$ Yfrom admissions_data_info
- W' D6 u9 }3 A6 D' s" M& igroup by business_year,area' h* _" G9 j; L6 F9 }
union all
# }" ]* q, p% S! L6 O3 ?: Kselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
5 _ Q# u' U' [+ e+ l) N( Kfrom admissions_data_info/ k% C4 _2 @& q8 S
group by business_year,area
+ n# m; n: H" H" M: tunion all
1 c6 ? h) |1 ]8 b9 O$ w dselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area6 w/ B, g! P; ?
from admissions_data_info : B0 U9 l4 \* h/ ?" I
group by business_year) n: l- W' D# \9 n9 W0 S
union all
C' e2 v0 u5 y% G! |: Sselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
& p. ^/ K# k$ v6 }7 z$ ffrom admissions_data_info
3 L; z5 i t+ k" D! [* Sgroup by business_year
8 p2 T* U0 Q% f1 L& c)a
& I) _+ S8 J* D" r; E8 Awhere area=:area1 ~1 L. @! U% ` v/ n$ ^ {, ]
order by x |