select * from (
3 u5 A, b2 ~) S8 k; U: s* m5 V8 Tselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area' N0 n& Y: U c1 z( {$ n; p
from admissions_data_info ( R4 @* V; `. e3 F
group by business_year,area& w6 r3 t/ f+ g( v$ _/ D
union all0 r+ @4 M1 q) o$ n# \0 V
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area/ A S J' K" R/ H# ]+ T4 i
from admissions_data_info
4 q7 v; Z6 s; Y2 |; V7 S/ x3 Bgroup by business_year,area/ Y0 |7 l7 H- R( U }
union all$ {" m2 x9 V+ c# R* l. `; g6 j
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
3 B; X' M5 e. c' O' f( Mfrom admissions_data_info
/ a$ ?% X p+ u) Egroup by business_year/ \- s6 h3 r# [, T4 O3 s* W1 y
union all4 y: y, r( G( ^' [9 ?7 l* {9 L# P
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area1 b, a" N5 Y1 u! V* l& f5 I) Y, h9 y
from admissions_data_info) v ]1 L" ~5 U, k) o
group by business_year
8 s4 J* k2 ^! |$ k" I)a
6 ~+ |, [' L6 X% u) \" @/ D$ owhere area=:area! p b8 I1 s: q* I- z3 V/ E( p% x
order by x |