select * from (
& O X g+ P% a2 S8 Y+ k' [select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area2 `) `+ p5 l) |
from admissions_data_info
$ F6 z( Z3 R! g y+ V: f& I$ lgroup by business_year,area
9 w6 @! r, R$ j7 U# Y9 \8 _- L7 Bunion all
! y$ `4 U. W7 I- Nselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
% E' V0 j" a8 w5 _0 Ffrom admissions_data_info; \( i2 N% X# f3 ^9 h4 D
group by business_year,area
9 L) C0 m& f+ K0 Z4 F/ Q6 p3 F9 ~$ wunion all+ k) k" P7 m/ z% O' _
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area' y: z& c1 y( p$ U: ~+ j2 e- V
from admissions_data_info
- z2 ?$ \8 V* [" T dgroup by business_year4 z' O% X; l6 x( }: N
union all3 ~- U+ ]! r8 R2 O2 M2 Z* w' U0 e/ R
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area4 X' v5 F/ G2 B/ ]* c
from admissions_data_info
. C8 ?6 T \" d9 D ~/ H+ w, k% n0 y! ogroup by business_year
8 X( l" v& y7 g# M ])a
( a. C: a. Z2 C2 _where area=:area$ ~' E4 i0 L0 F
order by x |