select * from (, Z7 P# r6 w( Q* x: Q3 i
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area; c O; T5 w' I9 {5 c3 ~$ W
from admissions_data_info
' ~# M7 l, N5 ]group by business_year,area
, y- y4 _" g4 W5 qunion all
% Y. {7 V: j( }7 m9 u+ H! mselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area1 Y6 r2 @; s* o2 U; z
from admissions_data_info
: g8 R9 i( t' s) Rgroup by business_year,area, P t; F% E2 Q& [! e
union all
; m; z6 W0 v8 fselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area9 l/ f; w0 I5 X7 V% m9 G9 L6 [/ @
from admissions_data_info - b1 } k: e* X
group by business_year% p. R7 R. S9 M
union all
/ a/ U& ]2 @% V5 ^7 F7 L: R) Tselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area* M9 O7 V* g2 t- I8 `
from admissions_data_info
4 g, f* A* Y Egroup by business_year# w$ h* W) m/ G0 T( n
)a. f' V* n& i. E) w/ x9 D( b
where area=:area; r/ W3 W& W4 C
order by x |