select * from (- F' U+ K) e# w- ?; o
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area( D" j2 A9 T# {" J* c
from admissions_data_info ( o2 G- O+ f6 H% ?' l7 l5 R a) ?
group by business_year,area4 A* ^* h; P# k- X, H
union all
1 q6 t! [3 L8 C0 H& M, Nselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area; P! i4 a. K; F+ @! h+ s
from admissions_data_info
0 ? r( h1 ]! o: X: vgroup by business_year,area
5 o: n) V: H/ Munion all
9 b+ s* X. k5 A( [' ]select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
$ [' J, G# p# y( ~' y1 efrom admissions_data_info
% ^: M% x3 w3 Z& U: Ugroup by business_year
# h4 O, c+ B( S% o2 v7 _union all
+ f' F8 w5 Q: p- W4 a3 E& a3 b: Xselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
% u7 U: z, a$ w( m! dfrom admissions_data_info
. U% H# }6 }' T- d' lgroup by business_year
& x- I9 t1 g) z3 M s0 |)a
' e4 }- z! {2 {where area=:area& ?2 d5 I- T& y9 a3 H* x
order by x |