I've got the query below against the table attached, I'm still getting mixed results as to the customer that has the product although I'm picking on the first instance of the transaction, the problem is only on days when the Model has exchanged hands on the same day.
select
modelnumber,
releasenumber,
deliverydate,
deliverytime,
customer
from
(select
modelnumber,
releasenumber,
deliverydate,
deliverytime,
customer,
row_number() over(partition by modelnumber order by deliverydate||deliverytime desc) rn from
deliveries)
where rn=1 And
etc......