select * from (2 |/ J) @3 R& r) @; M& r) y/ B, Y
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area8 M# t$ N4 _) z6 a" m
from admissions_data_info
/ G# y. Z6 `; k. ~# ogroup by business_year,area
1 C0 t! C- p2 ~+ ]$ J1 Cunion all
3 l2 \8 r0 f0 A8 P0 X4 @/ f" fselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area6 v4 Q6 b( h) k( H+ U
from admissions_data_info
, n7 t$ h3 w( B, m$ I7 Ogroup by business_year,area
+ f0 }) ^: Q! @- Ounion all
W9 |, C2 B6 W7 tselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
/ h$ x3 {2 l" L7 D: u, B' C- Pfrom admissions_data_info
0 O/ _/ \: y2 x! G- W9 kgroup by business_year; M) S& q/ _6 B8 y+ i
union all* Z: x$ x' d# v. l) i
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area* s. ]9 v) @' G! Z- \
from admissions_data_info0 b. J* G$ ~% s E
group by business_year% A1 B& \( I% y: b# j# h9 _
)a
* v5 V5 I* N4 U/ U2 [; Jwhere area=:area
4 d \6 p+ Z, Z( d8 N" ^& Aorder by x |