select * from (
|7 y+ }- _7 T$ {select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area' B& p) t5 c8 R( x( h8 n" i5 I8 L
from admissions_data_info
, U% ^! V' j% K) @3 K: }6 pgroup by business_year,area+ P1 R" R" k6 I% o# [* ~2 R1 I+ a
union all
2 `) U) i) u7 yselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
, b2 n) _" |+ t4 Ofrom admissions_data_info9 E6 K! E; q3 B9 c5 Q, Q
group by business_year,area
- g0 Z+ `5 ~( }; O6 u' K! p; dunion all z! m8 o* L, C3 p& o4 J
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
& k% \2 E/ K$ U5 Ifrom admissions_data_info
6 J/ ~. E9 G& W/ i. agroup by business_year
0 M/ `9 [, Z$ w2 X) q8 Runion all7 ?+ l. A8 a3 c8 a- ^- A
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
0 q8 {1 V8 ~0 [7 D& p; t* Dfrom admissions_data_info
: l. R$ Y; x! \- tgroup by business_year7 o3 b0 @9 f/ W; s6 P
)a
+ p* D7 j: |& n, I/ ~$ ]' E) twhere area=:area: u6 [) w9 _9 \ }$ K# P
order by x |