标签:des io 数据 art ar rom on select
select sn, pname, srnum, rerepairtime, rn
from
(
select sn,pname, srnum, rerepairtime,row_number() over(partition by assetsid order by rerepairtime desc) rn
from atzserreportb
)
where rn = 1
两张表一对多的连接,取多记录表中最新的一条数据,布布扣,bubuko.com
标签:des io 数据 art ar rom on select
原文地址:http://www.cnblogs.com/xsmhero/p/3897450.html