This question is locked. New answers and comments are not allowed.
Following linq works with LinqPad but with Open Access gives error.
var rows = from vp1
in
Context.VehiclePositionHistories
from v
in
Context.Vehicles
where vp1.VehicleId == v.Id
&& vp1.Id ==
(
from vp2
in
Context.VehiclePositionHistories
where vp2.VehicleId == v.Id
select vp2.Id
).Max()
select vp1;