select * from (
. {' E, N) y, N eselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area% X7 y4 z8 U- N4 M* u G
from admissions_data_info 4 R) ~) D. z; l8 }% k: n
group by business_year,area
$ i, l5 u1 y# v& H0 @union all" V; ?1 |- \3 Q0 n+ A3 V! @
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
$ u, r. W3 r* a4 E& c) Z8 N+ S- q3 Y% Ufrom admissions_data_info
' r" i. X8 P$ @group by business_year,area
* j6 H/ R" p u4 }, `union all! z4 v1 {+ G. Y2 o* R+ k; q
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
# O! v6 P [! U1 @7 n* X' \from admissions_data_info
9 R, U% Q8 X# J- T0 mgroup by business_year
( ~$ a+ U: `. xunion all( \5 f/ n' Z" `
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
; v) @6 [* |' U2 ]from admissions_data_info
6 J: S4 n7 I5 }3 l! V& Pgroup by business_year
/ L. ]$ \9 D! `) J# j)a8 D2 f7 ^, i6 ?+ Z/ i9 ^5 R4 _
where area=:area1 j9 B, R$ z8 g. @
order by x |