select * from (- w, x9 v. {- C3 b6 s: [
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area
" Q9 Q. ?8 b8 u4 {# l; Afrom admissions_data_info
m% u8 h2 B' s1 T5 h' Bgroup by business_year,area$ r' N. W0 M, n ^' `( A0 G$ P( ]
union all4 I& u& d7 L4 { Y, V2 E0 i
select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area6 _! k7 ~2 C- t+ x- C, R5 e
from admissions_data_info
# ^' z& ^. x8 n, Z4 z! f$ p' mgroup by business_year,area ~' u5 |' u/ y2 n$ N
union all
* o' g) J. C* t& Z' f8 H' F2 nselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area
7 J/ }) A2 |: c0 w$ vfrom admissions_data_info
4 |( K9 p& X' S/ ^* Ggroup by business_year8 n7 A9 l* Z! z
union all
5 e2 T+ M2 B" v/ n: W) Kselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area3 O6 q4 k9 w+ ]1 q/ O2 Y4 h+ u
from admissions_data_info( Q( v; N3 e2 N
group by business_year3 E7 |4 ?* p3 u1 O
)a* e, M a' C1 v: M" U% a0 V" J+ g
where area=:area
; n9 j1 o# i$ M& D* B# ?+ N- Morder by x |