select * from (
" O) K7 `" m7 D# L/ Pselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
$ }; j$ W: C+ h. A( R E! ]from admissions_data_info 7 i5 M0 h: q) N7 H0 a2 N
group by business_year,area f6 L g& @+ v3 ^+ A& h4 _, D
union all" f( \0 T% |/ e% i) }" A% b
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
% G* ~3 Z* j8 t+ i' ]3 tfrom admissions_data_info
8 S( E$ F e/ w |' W5 _group by business_year,area
* d+ B- j" v: t( hunion all
3 N7 O1 M, E# t+ Eselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area) u0 c0 K4 B& K( U. i2 d) y
from admissions_data_info
" f) L0 n) c% A5 F) Zgroup by business_year
0 J$ n# w% s. ~union all
/ E- r# ^3 K: U) a7 F! s! Zselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area3 U0 m/ u0 X8 e2 A7 B
from admissions_data_info
/ C9 p/ }9 s9 x8 Fgroup by business_year
2 l7 Y5 C; U5 j: a)a
* S* |' o8 I9 B, q) |$ Dwhere area=:area" L* ?$ A3 u7 m3 {
order by x |