select * from (+ J) z& u: |0 V
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area$ J. g1 g( }) I: m9 j
from admissions_data_info . D9 w4 r' W0 E. y; @
group by business_year,area6 X2 W" Y3 a G/ x' ]9 a2 D
union all+ d/ r% v$ N. u
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area9 n3 h& k* S1 `# |; P# y
from admissions_data_info. s7 M! l4 d2 u) k$ f [
group by business_year,area: H# {, |; {4 ~/ ^, e1 m2 H
union all
2 w. x/ T+ Z& h C5 O- ^select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area9 ?, r3 w, O4 I3 J
from admissions_data_info / a* e5 J- @5 W/ J8 ^/ Z. T2 `
group by business_year
1 G J) N" c; u! C8 J, ]union all
" O" v' e5 V. C/ @- eselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area+ V# W: Y* ]5 j! f+ o
from admissions_data_info' \+ H: R$ J9 r W' f) {
group by business_year
$ H* N% z2 o+ m2 n+ n! z, i)a
) L+ u; R2 m5 R. u- X1 Zwhere area=:area! K$ r9 T! ]; f% x8 N- D3 \7 Y0 W( S
order by x |