select * from (
' W x' f- K X% xselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area9 g+ w1 E- r& b$ d
from admissions_data_info 7 p3 T4 N, k! ]5 }
group by business_year,area
2 k. h/ s) x' F3 X0 vunion all
; e, _/ I$ ~$ D# n1 g+ @select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
" G" Q4 T4 B0 K/ R Yfrom admissions_data_info
6 \1 X5 N* d" x/ Xgroup by business_year,area1 d, G" d, _) i+ q9 c
union all0 W" U: ~2 r6 Q
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area$ `' s& D: U1 \2 O$ y0 H& A' ` r
from admissions_data_info 8 n! N: b3 B/ X& c# X2 _# F
group by business_year
( W" s6 H- R) ~5 S3 L* n& b3 q3 T, Xunion all
( B$ K }1 Q1 D# w2 J1 \0 Kselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
3 h5 k Y/ |$ E! a2 {9 H W* }from admissions_data_info
, p. H0 ]. ^+ u! T! O, }group by business_year
* l9 r# v7 U, c6 i- z$ R9 ?)a
+ y- n8 n" I5 b# _where area=:area2 N! h& x$ O) m2 E# v6 V- R
order by x |