select * from () G. o! D+ X( l" G
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area- n% ~. o6 d. k2 o
from admissions_data_info
, e H p6 W agroup by business_year,area
8 h) j. A/ V0 Y) ?, O r$ qunion all0 _& t: p9 t' A7 V& }$ T& j. }3 g
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
* [8 X9 T8 V( M: J0 Cfrom admissions_data_info
4 q5 D( G1 N! E# \$ ggroup by business_year,area( {" {' [" N7 Q( U
union all
" r0 {! [: B: x/ Pselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
$ B/ I8 q/ f4 {& }6 P; b% hfrom admissions_data_info
2 i; h, O1 D! m- Agroup by business_year
! X- ?5 ~) Z$ u' @: Sunion all
8 {/ O. g1 W* w8 w) [" H( B$ d6 sselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area4 Q, t. v$ W1 ~! K
from admissions_data_info- l i2 _' G; O3 s" f& |% R
group by business_year
0 `# h4 j3 l2 f+ M% I" v)a
: b/ |) v; e/ Y- [5 `where area=:area0 S( W3 L& p$ e7 `( K
order by x |