select * from (# x' }+ X2 T* h/ L9 V; k; L
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
! w" m9 q, Q$ a( b8 Ifrom admissions_data_info
# ^0 a0 C+ Z7 T% G8 xgroup by business_year,area
! ~; @8 J0 |: ~4 G2 {union all
* B* i9 K1 o" f& Iselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
6 ~: y/ K/ Z& d3 Mfrom admissions_data_info
7 t! o0 `% w% x) |group by business_year,area
% `/ v6 k* r6 a! |union all* J y2 r9 o1 K0 H& f) W
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area X6 M9 E i) ]) p/ T3 }
from admissions_data_info
6 j$ [! Z6 p5 Y6 ?, _group by business_year
+ p9 u" w( q4 [2 X$ {; N8 ^7 @union all
* o; o& r3 a% vselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
" U% m# j% \" }/ b7 O" ^5 g1 S2 r. Yfrom admissions_data_info) n8 y/ W; h% y5 G7 b
group by business_year2 P7 j6 C6 [0 s2 K0 u% D
)a
4 I7 z0 D2 a: X3 ?where area=:area% @1 i/ f6 B: V0 U6 a9 q
order by x |