select * from (
8 H, J9 k3 N, p1 v# bselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area; o, F3 b3 `6 y4 h/ c, a
from admissions_data_info
/ T: ^0 N V# C8 O, kgroup by business_year,area
: C: W, _+ |( S9 m6 g+ munion all
! Y% Q+ D0 M+ Oselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area7 f) K0 G Q% {, w+ L- U# H
from admissions_data_info
5 Z1 \0 R7 A, E* `5 u0 U* mgroup by business_year,area, }1 ^( Y) [; F7 {
union all. o: O( w, C a9 v- ]5 Y+ C
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area% W, |* d: L! u% M$ T! S# C* Z
from admissions_data_info / K% C7 s$ i3 q, _
group by business_year
3 p* S! ]; D* o& @) G) S) b% Gunion all
1 @2 C% s& K& T2 ^- Kselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
% J; v# @0 t0 cfrom admissions_data_info1 x) t% @* ]8 N, z
group by business_year: I: C6 [5 d4 `2 W( q9 n' \
)a6 P: Z8 N% [! Z, N
where area=:area
f9 z& i$ \1 ~- E9 b forder by x |