select * from (
9 h) D! j# q; B; Y) N. Vselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area2 O/ t; L& {; L" [
from admissions_data_info
2 A- ^' {' r+ d* @5 [2 T Qgroup by business_year,area
& d- d# d) A4 K8 y* W1 q! A4 runion all7 l, S2 q+ a1 Q C! Q- s
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
. j+ _4 I; r, F+ l% H0 \( ffrom admissions_data_info6 s! c: @. E; S* ~
group by business_year,area) j" `( ]1 d/ t
union all
4 g! x6 ]8 d2 Z4 H% V6 fselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
* R5 H3 o, ]* n8 J* Ffrom admissions_data_info & X6 M$ V9 Y, S# x
group by business_year& p7 h* o. S6 j1 v9 R8 X
union all
* z# T6 U4 {" Q( X& R; V1 dselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area* e) y$ Y2 f! E2 A! V% N5 A
from admissions_data_info9 I! `& c7 N" `2 Y( f7 `; Q
group by business_year
+ e* a7 {( u. c' P6 q)a
, `: \7 d% h( @9 P" Gwhere area=:area
2 S1 i- l' _! T# D% Oorder by x |