select * from (: H# Q/ w7 S) X2 k2 W; T; M
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
) C$ L/ D5 M y3 u' Dfrom admissions_data_info # Z; r; E/ E7 u" `, p
group by business_year,area
8 `5 Z6 n$ X6 D, w, t3 munion all% M$ U3 N5 y5 z/ M- r
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area) D9 U4 S& \3 I0 U8 A! w! s
from admissions_data_info1 f5 u3 F) \! h4 j% ?8 T) }! X
group by business_year,area3 `2 s; I! a0 G9 _5 B( U
union all: H! I, p* R$ k( G$ |
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area7 U4 h# V1 I+ C1 d! f
from admissions_data_info
* z$ U, G; K% {& B# ggroup by business_year- Y. L2 i8 E+ @0 O( V
union all
- a' C$ N. S5 B, w3 mselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area- d2 |4 v0 n* I/ r- `, Z% Q- j
from admissions_data_info& Y4 A* R4 T" u
group by business_year! p& f8 z% O0 [8 Y
)a( f/ ^+ @* h! @4 ?/ }6 A; v* c, h
where area=:area
3 s, d+ E! i0 ~$ E( ]1 dorder by x |