select * from (0 o3 C# p+ j& q# U
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
# r+ F& S1 A! G# Qfrom admissions_data_info
7 ?/ B) k4 ~6 o' [6 _6 Kgroup by business_year,area
# ]: e$ [) E+ f# n7 Z |' ?$ ]union all5 w3 {: C. A/ M
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area: I$ Q9 m3 Y3 B
from admissions_data_info& e8 ~& c9 h: c" j3 ~
group by business_year,area
) ^7 g) `- r! l7 I4 aunion all
! C9 V* h \! [2 Z2 I/ zselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area O6 c- y( L9 \# @
from admissions_data_info + k! W6 n# \$ p+ t |
group by business_year
1 ^$ U' `+ @ K4 q2 D# c( o5 }) [union all
% _7 e4 Z3 e( M% j% K. f, G& yselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
8 O1 ^2 m; @2 a$ `: m1 j; Hfrom admissions_data_info. I: M8 t, |% l# I6 \3 h
group by business_year
: Z# u8 [0 L* V2 Q$ h( S6 t)a
' \( A3 r" ^3 n/ Twhere area=:area5 d* n# F8 P/ P% F
order by x |