You can match the person-city pairs but reduce it to a set of distinct pairs and then create the cirtual relationship.
MATCH (person:Person)--(city:City)
WITH DISTINCT person, city
RETURN person, city, apoc.create.vRelationship(person, 'DOES_A_THING_...
Without really knowing much about your setup, simplistically, based on what you ahve described, you can find the most recent relationship this way
// match all relationships
MATCH ()-[rel:RELATIONSHIP]-()
RETURN rel.date AS date
// order them in des...
I took a crack at solving this and I think I have a solution that works. It is not that elegant but I might get back to it later.
It uses the apoc.load.json and its ability to use a json path. It does it in two passes. The first pass it gets every g...
Here are a few queries to get you going on your solution.
This is the simplest one. Look for a path, p, that starts at 'A' and ends at a node with either 'Z' or 'stop'. Then return only the shortest of all of the matches if there are multiple. The th...