select * from (
* @7 e: d1 A: I+ i& Dselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area/ D* w! ^2 B6 T8 q6 P
from admissions_data_info 0 b, s, @& C* z% o
group by business_year,area
7 v. ]% G8 \* o6 Z2 |. [; zunion all( _5 R/ v; r6 s( |, l5 \& N6 @
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
* L) Y* S3 T7 G! y( F0 q* Y$ Dfrom admissions_data_info
- n4 F9 v& o9 g) V6 ggroup by business_year,area
8 @1 j/ i# U V2 n) K/ kunion all# Y* R, y2 [$ K P6 S! Z
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
1 J# W( Z8 C" |3 B4 dfrom admissions_data_info ' B! B8 j: L& X0 e2 U% ]0 [: B$ w
group by business_year! J* F& }% K1 O6 ?9 ]
union all
: U# Z/ L$ B* m1 t$ G! mselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
6 ]3 e' E5 {: Afrom admissions_data_info: D: A4 ]! y* u4 @5 W
group by business_year
0 Q/ U2 f5 S/ u" G, K- T)a, u. N8 @: z; Y% P& O) I/ k5 X
where area=:area. K( X. v% _) E! G
order by x |