select bh,sj as a_sj,0 as b_sj,0 as c_sj,0 as d_sj from a
union all
select bh,0 as a_sj,sj as b_sj,0 as c_sj,0 as d_sj from b
union all
select bh,0 as a_sj,0 as b_sj,sj as c_sj,0 as d_sj from b
union all
select bh,0 as a_sj,0 as b_sj,0 as c_sj,sj as d_sj from b
union all
select bh,0 as a_sj,sj as b_sj,0 as c_sj,0 as d_sj from b
union all
select bh,0 as a_sj,0 as b_sj,sj as c_sj,0 as d_sj from b
union all
select bh,0 as a_sj,0 as b_sj,0 as c_sj,sj as d_sj from b
union all
select bh,o as a_sj,sj b_sj, 0 c_sj , 0 d_sj from b
union all
select bh,0 as a_sj,0 b_sj, sj c_sj , 0 d_sj from c
union all
select bh,0 as a_sj,0 b_sj, 0 c_sj , sj d_sj from a
修正笔误
select bh,sj as a_sj,0 as b_sj,0 as c_sj,0 as d_sj from a
union all
select bh,0 as a_sj,sj as b_sj,0 as c_sj,0 as d_sj from b
union all
select bh,0 as a_sj,0 as b_sj,sj as c_sj,0 as d_sj from c
union all
select bh,0 as a_sj,0 as b_sj,0 as c_sj,sj as d_sj from d