select * from (
. G: o! m; ?: J Qselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area# ]( n" n+ V" _' O4 y8 W5 a" p
from admissions_data_info
4 ~, X' J) C& ?) q, H3 [! ]group by business_year,area
- e9 V) g6 ~% f# D2 B' x" q/ j0 Vunion all9 ^9 q" S$ w) E- x" Z
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
# R* @: b6 g; H; @' Efrom admissions_data_info
4 }8 p5 y+ k" G- [1 _group by business_year,area
5 u* t* R( N9 A* Aunion all
- E/ b1 H: ?5 d8 D" C; cselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
) p% S _1 @! N; I5 I. Y& M) Qfrom admissions_data_info 2 l: i, z5 X8 k! B3 f t1 w* c
group by business_year& f9 f0 Z& h) Q: z. I
union all
" Z, t7 u" R8 m& u# C+ N4 {select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
# b9 i5 s. x4 `( `1 `from admissions_data_info5 S7 o+ G9 z0 S; A: ~4 U5 w
group by business_year
+ I+ j3 h5 \; m, v: o)a
/ i! ^- _' S4 v, b2 Twhere area=:area* w. e0 P# w3 Z$ Q+ b/ _
order by x |