select * from (
7 Z8 p- v4 ]. w$ i, P' P4 lselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area. C, N9 P( k3 ^- b* Y3 V0 o
from admissions_data_info 5 @: q8 m7 c$ X! [6 `0 c
group by business_year,area
2 D7 k7 t- y# Runion all
N S1 b) P6 H' Q4 q1 S( p5 U/ C6 G% Sselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
' v: w4 P/ ^% p& F9 a: }from admissions_data_info
, A& g n+ J! l J G0 C! t) Jgroup by business_year,area
0 F6 }# T4 k7 D& J* {4 u, t/ Q' R2 U1 hunion all) }5 i8 j ^$ R$ f, r$ y& H
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
6 m5 k+ e7 S _+ xfrom admissions_data_info / z4 P: _& ]9 [. C7 k
group by business_year
5 [; U0 p% P) o' g/ ?8 ?5 y: eunion all
5 w0 B& R1 s" }0 M+ W5 k! [ eselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
/ c. {) V( p; l- O0 I" {8 M- Tfrom admissions_data_info
% S8 B3 V( B- I6 D0 egroup by business_year
5 S7 }' ]- L7 \8 i, q)a! t. M8 m0 m8 d5 J9 Y
where area=:area5 T' |9 t7 p G
order by x |