select * from (
5 b, L6 @1 c/ ^* ^select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area) Y. W& N! ?! [- v" {# J* k1 ]
from admissions_data_info ' {' b6 g6 z$ k- W+ K+ p5 s
group by business_year,area7 `1 I$ P' |: G4 p& Q4 }
union all
) y, u( L( k& a# P Q5 f Eselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
% g+ ]: r; ~ c' ]! {& pfrom admissions_data_info
% e1 E" V2 ~* }5 H" egroup by business_year,area
$ f7 y1 u: Z1 v1 T$ X4 xunion all( F( h' j1 Q8 q7 K5 f0 D0 \
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area" J3 T5 E1 X( J/ `; }4 ?. K0 V
from admissions_data_info " Q5 K/ K3 W& g2 J) ~9 \( x0 s
group by business_year
8 J# t3 x, u. q$ Hunion all
% {9 m; h+ H$ o) Y: o0 H/ Fselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area9 c; m, g% g5 r8 ?
from admissions_data_info4 N6 q( v% H7 w8 H2 T
group by business_year
6 J6 @; [& O4 Z: l! b9 H)a9 B3 N3 R, o* e4 g
where area=:area _: [( H6 y. w/ S; M
order by x |