Created
January 5, 2020 14:44
-
-
Save vladbatushkov/7fdec2c67dcb98feed5e45e183749169 to your computer and use it in GitHub Desktop.
Flights Search Application Path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH { a: "Moscow", b: "New York" } as params | |
MATCH path = ((a:Airport { city: params.a })-[:FLIES_TO*..3]->(b:Airport { city: params.b })) | |
WITH nodes(path) as routes | |
RETURN routes, SIZE(routes) - 2 as stops | |
ORDER BY stops |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment