select * from (8 a$ d2 f+ z7 h/ S6 K# o
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
9 |8 C- X( f9 ?3 w) ? hfrom admissions_data_info
# M- f" b5 W4 n- ?* b( ngroup by business_year,area
/ V# M1 F0 t a3 J) Z& W punion all" d7 B3 M8 e9 i- y
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
7 Q8 b) S# l( bfrom admissions_data_info
5 |0 G; f0 V+ H1 R( ^+ n$ n% _group by business_year,area
: V7 D4 U0 ?% dunion all: T' M/ d1 \ s0 e' l
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
! @: X4 N( ?6 j' [$ k0 \from admissions_data_info
2 g6 \- M1 `, _% Jgroup by business_year
$ K) x5 [2 y5 X: }6 U( i gunion all! X1 |3 q' O- `% V1 Z
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area3 u# j* ]& W; f% a
from admissions_data_info
0 F) ?' B+ w0 g# Xgroup by business_year
f0 L( A0 l5 x7 Z! v/ o: D" l, ^)a
# s- t& K8 i0 y; c# y' ^( ywhere area=:area7 _& J1 `6 C5 t4 J
order by x |