Skip to content

Instantly share code, notes, and snippets.

@lennertVanSever
Last active May 12, 2020 08:07
Show Gist options
  • Save lennertVanSever/d59e5de87862991ce5b5d38baf073154 to your computer and use it in GitHub Desktop.
Save lennertVanSever/d59e5de87862991ce5b5d38baf073154 to your computer and use it in GitHub Desktop.
MATCH (a:Country), (b:Country) WHERE id(a) > id(b)
MATCH p=shortestPath((a)-[:borders*]-(b))
WITH length(p) AS len, p
ORDER BY len DESC LIMIT 1
RETURN p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment