select * from (6 g- h- O$ Q7 U3 k q
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
4 v8 G" T; o: W$ C7 a! M6 Bfrom admissions_data_info + k! |: K: M! L: {, K% X
group by business_year,area7 J: u% P; Z8 _: W
union all
. i, A4 V4 l3 G B7 R/ aselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area' c1 X3 p' e) ], n; Q
from admissions_data_info; H' \1 u: N4 O5 A
group by business_year,area
4 b/ Y* u+ z( m7 Q. A/ A3 z+ D5 ], Ounion all
/ q3 S2 W. ]+ H( ?) }2 aselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area! D# e* r i4 m/ j' F3 H
from admissions_data_info
/ W- e4 _# F* ugroup by business_year
1 U, j4 o. L, E- r! _union all
: ]* O# r( X8 X2 D- C. }2 ~select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
8 n* m8 v# O3 f4 w. efrom admissions_data_info
9 q8 t6 v/ O% }group by business_year
) G6 {% o- [' A1 J0 D: ?)a
6 F1 C$ o$ F L8 l' Ewhere area=:area
0 y1 c& s, |5 T& R0 i b& L0 A3 Rorder by x |