标签:时空
select a.*,d.dwmch from fr_spkfk0819 a
join spkfk b on a.商品编号=b.spbh
left join (select dwbh,spid,row_number() over (PARTITION BY spid order by plh) row from spls_rk) c on b.spid=c.spid and c.row=1
left join mchk d on c.dwbh=d.dwbh
标签:时空
原文地址:http://bks2015.blog.51cto.com/9847303/1685766