select * from (. ~: @- X# m4 u4 `* W
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area0 Q7 J, i6 z% M$ z: F
from admissions_data_info
6 A: t' Q [3 G3 g$ @# agroup by business_year,area
% m+ E$ s% y h' munion all! k! {' J* G4 v( w# u- m+ U) t
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area. Q4 y' [! G+ I8 Y6 n: d! f
from admissions_data_info
- _3 o7 G" J& ?2 l2 [group by business_year,area
$ I w* A& l% H# @+ z L8 Xunion all
2 D$ L# `/ m3 _# o' Z0 p5 sselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
1 e, o0 N8 J9 G; r Pfrom admissions_data_info
: y: l8 m& A. Q" U$ Qgroup by business_year
0 o4 u+ {* |- r0 f' ~) |7 Ounion all
8 L, P% G9 l1 G6 O" uselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
9 ~& M$ _4 R# z! b; G6 bfrom admissions_data_info
! {" J& j" \2 X' m+ u6 a; Lgroup by business_year( j2 _7 j' L$ G- T" O6 \
)a1 I& A- f. v! H& T6 z7 d! Z% X
where area=:area) s6 `; h- d; y, R' l o# ~
order by x |