select * from (7 a% ~+ Y7 L8 B$ Q1 ]* _
select business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000,1) y ,'招生人数' as s ,area. k5 A/ c5 C; `' v! N4 B8 @7 J+ K
from admissions_data_info
0 |0 G% @) l% t6 i W0 lgroup by business_year,area
0 g. A i; v, X: Vunion all
8 O/ a! Q9 p/ {1 ?: ~% ?select business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,area
! Y9 `% Q! D7 }3 hfrom admissions_data_info6 p$ ?- @3 M& ^& D/ H/ L. o5 S
group by business_year,area* i* g! _0 Q/ C' P8 K
union all
: f K7 X% K6 {1 S9 Yselect business_year x,round(cast(sum(recruit_student_count) as decimal(20,2))/1000 ,1) y ,'招生人数' as s ,'所有区县' area! R* P, n: }7 ^4 [- d2 E
from admissions_data_info ) O6 B) V* c+ S
group by business_year
' t1 ~6 j0 Y+ C( `6 \union all
- M$ d G$ U% B# x, t7 w2 E) Aselect business_year x,round(cast(sum(school_age_number) as decimal(20,2))/1000,1) y ,'入学缺口' as s ,'所有区县' area
3 r* a* g9 n1 @from admissions_data_info6 V1 M/ }' d# y, d Q5 A8 j, @" h: B
group by business_year* ^) U+ K* W9 ?( l2 G. L
)a1 s, O) D* C; Z) [) y( r
where area=:area
1 h9 f+ D+ K; T5 b. d! d8 {& |order by x |