select * from (
! J) W2 F0 M6 B+ W, Pselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area; i' c( K) c% u% R# C' v: Z- c' i$ }. G
from admissions_data_info 9 a. n; }! g2 n9 u6 u
group by business_year,area
; e: a9 {/ w# K& Kunion all
/ _' h. S4 n/ ^' }, ]! m- Gselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area9 Y& j( h9 }) @+ Z; a
from admissions_data_info: f% b7 K5 h6 Y9 p ]
group by business_year,area
! C" X% R2 ^; g2 {! V7 \: @union all
% D( O; C5 h6 l$ k. _( Rselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
I+ c( W* L' [5 X' _from admissions_data_info ! a4 b ]! c" Q$ y; c, U
group by business_year
: C( }& \ I0 |3 B$ }union all5 h. @! v9 S3 u7 ]. f
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area! e2 @% Z, c) d. Z5 ]* B6 @. F
from admissions_data_info
, F0 ` A( b0 \) a# qgroup by business_year
/ _" q& W7 v5 I# q q( V)a
( P1 D0 Y" U+ bwhere area=:area
6 I v% E6 A' W1 g0 s0 I8 |1 dorder by x |