There are two labels Car and Session. The Sessions are ordered descending with limit 1 to get the latests Session. This latest Session has one playerVehicleIdx as property. This exact playerVehicleIdx should be matched with the right vehicleIdx of the Cars available.
Idea:
MATCH (m:Car) with (n:Session) Return n ORDER BY n.sessionStart DESC LIMIT 1
WHERE n.playerVehicleIdx = m.vehicleIdx RETURN m,n
The query is wrong and i tried many different variants that did not work as well. How to fix the query to compare the property value of the one node that comes from the sorting of the Sessions with the property value of the Cars?