select * from (% j; h, j" A" A
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area/ ], w& x! M- p( i8 ?$ u; w
from admissions_data_info
2 j5 ~. u, L Q+ a: q7 Ggroup by business_year,area4 T, E, _& v& n9 ?5 ]0 D- S. ]7 A% [
union all
2 S# i& \# c! @8 i4 U) ]select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area& y- D% E# ?$ }8 X6 s) f9 d
from admissions_data_info0 X3 {: R5 @7 l
group by business_year,area
- x4 ]- Q. S" G* Gunion all
; [" g0 Y' h: U" A/ y r3 tselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
- O. e$ t; {3 f* Zfrom admissions_data_info
. d6 W$ ~1 |9 K8 p0 w6 S$ sgroup by business_year
& d' I9 n! p8 O8 p2 {9 {: R) Wunion all
5 P1 j: H b0 Fselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
. `( {% p V } E( b# ffrom admissions_data_info
7 Q0 x+ K6 }/ M- B4 j" Z! ?0 D+ U$ Igroup by business_year# H" w& |5 b& V0 X
)a
$ q* ?1 q$ ^1 O `0 Z# Vwhere area=:area4 [# H2 V a, t! h
order by x |