select * from (7 V# b- V" b8 O$ U
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area9 Z; U* z1 f& p( v2 s
from admissions_data_info
! G5 d/ S: E7 `4 S( j7 l% E0 [6 bgroup by business_year,area0 C% u0 I9 t q+ ]" x/ f3 _
union all
$ q/ I$ `$ q. c1 I6 s" p( u) Tselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area4 a3 v$ l0 v$ J6 W1 j
from admissions_data_info
; y$ `+ n) M) o z! m `% hgroup by business_year,area5 j, @: p- ~$ K* A8 N4 U- A
union all1 P" T$ E, j" N6 D
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
' J# U0 W* K* A& P; |/ M0 k5 \from admissions_data_info
0 x5 [8 T; v9 E( y$ N% N8 p1 lgroup by business_year) e d7 N% @, u( j8 p0 x
union all
& f& Q+ Z8 i% i; G# jselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area# s- j+ ]4 Y8 E4 B2 b' [9 b
from admissions_data_info A& O$ D o0 @9 M) m+ R
group by business_year
* A% i$ h; U3 b5 e4 Y)a U( {6 u$ s' M4 G0 w% N0 e& U
where area=:area
5 n0 g5 r' G* }4 R) R0 |* i# }$ K4 C( Horder by x |