New to Neo4J/Cypher and here is my query:
MATCH (origin:BusStop)-[bus*]->(destination:BusStop)
WITH bus
WHERE origin.name =~ '(?i).*Origin.*'
AND destination.name =~ '(?i).*Destination.*'
AND all(rel in bus where rel.day in ['Sat'])
RETURN bus
I'm trying to get all the possible buses between the Origin and Destination. I also want the total fare (as a sum function) in the above query.
Note: The relationship has a property called fare SUM(bus.fare)).