select * from (7 n9 _- F! h+ `8 G9 R. w0 D
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
8 @) k; } {8 A/ Xfrom admissions_data_info
: X% d7 M! x. y, V1 X1 |group by business_year,area
# x4 O! Y9 F, c2 L4 J9 tunion all/ T# v( f. ]* g" L# @
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area) S! }1 i( U& j$ E- t& `& {$ w
from admissions_data_info
: u+ b0 n4 W% i- X- Ggroup by business_year,area
$ b$ I4 @6 t: P9 v3 Y. O- {union all; c1 ^, u% c; A& Z. U
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
# ~1 U4 t% C) M3 T9 t, Tfrom admissions_data_info / o5 I! [7 c. O0 {
group by business_year7 S& e4 Z! j8 v& X! v
union all
# v) U& Y6 L% {4 F- s4 |4 X* t2 u8 Zselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area1 l6 C5 _5 c$ z/ s) }- }
from admissions_data_info' \& w+ }0 t0 T* ]
group by business_year
! j/ j' m* b- b: p/ r- [8 p+ T)a
8 A/ c- j! t9 g* W/ Y& ]! Swhere area=:area0 i" }# k) a$ J$ M) s7 F
order by x |