select * from (
7 x3 Y% D/ m2 F7 y/ A6 M: t8 Y' ~select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area6 q# H- ]) ~' q. u$ u3 j- @/ A
from admissions_data_info
0 l. g3 I; b6 P6 n# S+ Kgroup by business_year,area
$ y$ d+ m+ j* P7 `/ i( Lunion all
1 r; T1 K4 M" ~: G2 g3 Wselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area, E( r$ S" h' W+ O
from admissions_data_info3 l" Z4 X( g2 H
group by business_year,area8 z' F: y6 n* ]8 d
union all
6 E& d" p0 c# w6 [9 o% m( E3 Zselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area5 B: [! b5 N, Z1 C- f9 l
from admissions_data_info + O9 g m X3 A& N
group by business_year
! H* c% R7 T" m' munion all
; Z1 p% k5 l" ]select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
% I8 ~+ l: f) [8 s. ~8 }0 R( a$ Xfrom admissions_data_info9 j' p) B, p7 Q8 F3 Y$ V
group by business_year
2 I4 R2 t, A% L4 `2 E' D1 a)a
3 w9 Q6 p! E z2 J2 v/ N7 Fwhere area=:area
" p3 }6 L; J* U" H+ Sorder by x |