select * from (2 G1 ]9 t6 r4 X7 D% q" i- e
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area" q d4 {- H* W, t+ a( h
from admissions_data_info
6 c5 v6 G% v: ]5 w, U, K7 ?group by business_year,area
1 p- M4 G, [& D$ o& m' A: m' gunion all A7 E1 P; C) ^2 h
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
, P& I4 ]6 U* Q3 efrom admissions_data_info$ M% K7 N) E8 ?' N0 `6 J
group by business_year,area
8 S9 e3 Z7 f$ tunion all
6 D6 `8 f) V! v3 M5 N. P y" N- jselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
@& G* t7 {/ L$ ~$ d% xfrom admissions_data_info
2 l/ G9 H6 v0 W% R8 d4 tgroup by business_year2 w/ o- e2 `: U" y' a
union all# N% m6 m$ f& J/ @3 i' ~; j6 x
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area7 B$ D. N5 N j$ k) J
from admissions_data_info9 Z8 q" n6 k0 T0 f. M% n8 I! _
group by business_year
; G" _! x" L. D6 w1 R)a
0 Y5 M" P5 w* \$ _3 _' N: swhere area=:area
5 Y% C$ f% N9 {2 s0 F4 J* rorder by x |