select * from (; f* Y3 ]. F+ b* t4 Z! H1 y6 q
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area/ k9 [* U8 n! A4 x
from admissions_data_info
" v& i) `; R8 u) A$ T2 S% vgroup by business_year,area
: D4 W5 @& L( X( L% G1 ]& Aunion all
0 i1 t; y" l2 l+ pselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
; ? D# U: I* Tfrom admissions_data_info
9 B5 z5 a9 P1 I. |7 M* Ygroup by business_year,area
. G: ~0 l8 H; k, H$ j; C/ G3 ~union all
# R/ @! `+ r: f! B+ Bselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
/ ]! i3 E+ m3 e( J: o1 P3 }from admissions_data_info
; [# O) p$ H9 h6 L& r" dgroup by business_year) K: q3 c: q5 v- G7 r
union all
D/ g G, ~5 }+ w" b& t; `" Gselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area9 w2 ?) `; l8 h9 U* Q: p* m
from admissions_data_info
! f9 H% K6 S# _2 h5 k1 D* P- r3 Mgroup by business_year
0 x: \/ S0 K$ \" g& o)a" Q0 j6 }6 u' B3 h4 x; D( u
where area=:area
, D2 d6 V! N: Eorder by x |