select * from (
$ M1 ]- _! s8 K3 S0 c/ X" bselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area- _+ r' [0 q& P
from admissions_data_info
?" [6 Y- N2 E* d ~7 fgroup by business_year,area
- K0 Q c3 G" C u1 ]) tunion all, U+ y3 K5 J% p) D* M
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
0 j+ F$ {# y; W+ o. P. `from admissions_data_info
* M6 m/ Y& X' i, cgroup by business_year,area
4 T2 i. Y- I# f& x, Yunion all- t7 |! P+ i' n: ]1 v8 K
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
8 L# `! |2 K1 f. c$ S9 I! y9 mfrom admissions_data_info 9 M+ y. c8 V4 W8 r" h& E
group by business_year
0 Q, Q$ W0 B$ q% qunion all" e" o% y( D, v8 r/ o1 E' b; `* L
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area& H$ Q+ @ P2 Z7 ^+ k
from admissions_data_info
8 v5 @: V. e9 _) c* i& W. ~group by business_year
3 \, \2 a4 }) y6 `0 u- ?)a
. f4 j' N: b- z1 K& a4 e& ^- hwhere area=:area$ t8 b% ?# \# H0 Q* P9 X/ J+ a
order by x |