select * from (
- m4 u4 G1 Z/ M8 s9 I. V; Sselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
% Z* [6 z4 c5 A: o/ |6 s5 O, k& {from admissions_data_info
2 J& \9 C) R1 Z. `/ Bgroup by business_year,area
A3 V( @" ?0 T3 uunion all* k! Y, v7 o" p
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area6 W; S) ?$ G2 p2 y% A' T2 O, P
from admissions_data_info
2 D0 k/ m5 K! b7 P" Q: V! _group by business_year,area
: Z+ q5 G, D3 C G1 k; M' L: u y, \union all
/ \4 H7 E$ @: a2 m4 k3 oselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
9 y+ O9 Q: k% q+ ~& d W; Jfrom admissions_data_info
4 W Z, {/ B7 w1 Y7 ?7 _group by business_year
, s% G9 X n7 E. g$ u- uunion all
. p/ t+ H& P! Rselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
1 h' h& V6 I- w8 `from admissions_data_info
3 W$ `1 c7 ~9 a+ o- T# }: vgroup by business_year
" A ?& a7 M9 K, M)a
8 s/ j1 Z1 ?. k% N! W5 E2 pwhere area=:area
3 _" |$ P- o- n& qorder by x |