[英]how to get the latest row from the table for each vendor?
您可以使用相关子查询
select t2.*,s.sup_name from
(
select t.* from procurement t
where t.procid in
(
select max(procid)
from procurement t1
where t1.vendor=t.vendor
)
) as t2 join supplier as s on t2.vendor = s.sid
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.