select * from (
: c$ f& r2 m P/ X& \; vselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
5 m" {* O8 `* T2 Jfrom admissions_data_info
& Q$ `# U. |! k- ogroup by business_year,area
' H% W( S" s z6 p2 Yunion all: g# v2 Y* M1 V$ x- D5 w. X
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
, I+ \6 _3 u9 j. O* d4 Yfrom admissions_data_info
4 j; x v$ X1 V) @; F. fgroup by business_year,area
5 g* p3 v; ^) qunion all2 ?: Z7 Q. w: o" f9 ^
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
& R& ] P$ e! I3 b5 kfrom admissions_data_info 4 {+ P7 i: c9 i* u9 ]* R: e3 W
group by business_year
9 k6 c4 H1 l- w4 U; _9 Punion all' Z" y$ z* C0 [" g3 d( y9 i
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
5 b2 w' s7 |4 F5 G1 @/ yfrom admissions_data_info
3 ^" `8 `) F- t8 G' [8 Hgroup by business_year
, _5 z6 V. ?! ~% z1 [$ z) j)a
2 O( u& a' n) z) ]) @( @where area=:area
7 i7 r: [& D& p2 Q- d' }0 D/ Horder by x |