Skip to content

Instantly share code, notes, and snippets.

@augustl
Created January 25, 2018 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save augustl/525802d211d6d67f41f2c38b09e6a3d7 to your computer and use it in GitHub Desktop.
Save augustl/525802d211d6d67f41f2c38b09e6a3d7 to your computer and use it in GitHub Desktop.
UNWIND {legs} as pair
MATCH (stopA:TdefPos)--(stopB:TdefPos)
WHERE
(stopA.logicalTrainId = stopB.logicalTrainId)
AND
(stopA.stopId = pair[0] AND stopB.stopId = pair[1])
RETURN stopA.trainId as trainId, stopA.itineraryId as itineraryId, stopA.periodId as periodId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment