select * from (
3 ]3 K) d+ P( [1 oselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area5 U. L4 d& ^# n3 e+ a( P! U, n
from admissions_data_info 7 M# e& g7 e2 w
group by business_year,area
7 p! T, m! W) K8 H9 N) lunion all
0 G9 i' Z$ G( {3 E, bselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
3 ?7 X: v# W7 N6 _, F: n/ d# M9 t& nfrom admissions_data_info- T, R- }1 F4 r0 R4 \$ v2 f
group by business_year,area
. ~5 N3 k6 D1 [7 y& [( x" Y. Zunion all
7 w5 ^5 R/ u0 u6 q# V* Zselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area/ n C4 |. @. \! l
from admissions_data_info
' C: Z. c. \8 ?% _6 n! E: ~2 ~group by business_year) y5 F/ {9 B. C
union all" P$ W2 N1 G+ `
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
3 U$ n2 V+ S5 \from admissions_data_info
% Z2 z* A& H- ]1 r' m2 jgroup by business_year
! L$ l! B7 M% f* `3 z* u: P' l)a- H. w' F- J1 C) o. p
where area=:area
/ [5 r2 f) ]- F, D: Uorder by x |