select * from (' R. U! Z: v& N% R# C0 Z6 c
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
, d7 ]3 ^# ]! a9 G, l5 X6 A; ffrom admissions_data_info . B8 T) z9 A) f9 @6 i
group by business_year,area \4 q ^% |0 Y1 I$ g6 v
union all
, o8 y9 m b2 ` Q2 H/ Hselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area! X. e, W3 V8 R9 d5 _4 `( X
from admissions_data_info
* j+ j! i+ t t/ h9 O4 L0 K# vgroup by business_year,area( `; v: a! z- N6 k, y' N
union all
8 k# c0 }* c: w/ [+ Kselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area, ?3 x% C4 K( y8 w" y
from admissions_data_info
2 }/ Q3 ?/ @ [1 w% ]2 Cgroup by business_year: K" j+ l. l) Z; h8 {: W* z0 L
union all4 ?# [5 ~3 L) E$ w& P! U
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area5 l7 d* J8 j9 j+ S
from admissions_data_info
( y% g$ ]0 a+ v6 g% zgroup by business_year
2 I6 D# t* ^, G+ z6 k' |)a
1 x" d4 Y" Q' f( T* gwhere area=:area# r2 L0 F. h4 k
order by x |