select * from (
. d9 t, Z$ C5 e; |: ~* q) Y$ Pselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area* p ^. S8 v8 x& p t
from admissions_data_info ; Y5 B" J5 u! {
group by business_year,area) R/ o8 E- ^) \1 U O' v) ]3 U5 _
union all
$ [+ \/ C; q9 ^+ v' ~select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area [- p: w4 N) E) ~2 v. e
from admissions_data_info$ m# }9 ?4 a3 l' s
group by business_year,area
6 \1 ~$ V* v1 t; {9 nunion all4 v% @. a) U! l: `% _# b) W, Z# g
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area9 h0 v( D' Y8 r! d+ v3 Y
from admissions_data_info
" f& i2 k) J. M$ Qgroup by business_year
( K$ A4 a3 z$ ~) S) E5 e, C: {union all
9 X& h( I5 ^9 w% Cselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area( i: b7 G/ @) t4 f; Z" a+ T" |
from admissions_data_info
4 p1 z9 M' M2 ygroup by business_year- z; {9 Z. ~2 Q: v( T h. |$ B J
)a
) F! U& a ~. nwhere area=:area
2 _ x; s4 [7 B* ~order by x |