select * from (1 d1 ?- r/ s9 i
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area* t4 n) }" L& S, C5 `. i
from admissions_data_info ) {% J5 k* Q8 C# {+ U8 \2 K2 F$ D ~0 \
group by business_year,area* T# t) K4 O" A: I5 j
union all
- P! M. H, u$ I8 l9 c% ~( \/ Jselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
, A* B" O$ o7 R/ H; Nfrom admissions_data_info
" K' Y3 {% [ J0 z! z5 dgroup by business_year,area
0 V( R9 P9 r2 E. q; Junion all
6 U6 i+ p- X# Qselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
* G& U$ E7 h! ^% Kfrom admissions_data_info ) a2 E8 W9 h* K% T6 J+ z
group by business_year- a; G: @- u4 k2 t$ a
union all: s4 L! A# C7 ]: p; x
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
& V, J5 a1 d" D1 |/ R0 ofrom admissions_data_info6 I/ u6 O' L' R5 K3 `3 p' H
group by business_year
. h! t9 H# K5 O; U) T0 z) [)a
6 b- L% r9 t, f' R! lwhere area=:area
* v/ A* w4 \: ~order by x |