Background:
I have a graph with Company nodes joined to eachother through One or MORE relationships.
Looks like this:
Trying to Achieve:
I want to keep all nodes where the relationship between them is "competes_on_backlinks" BUT if another relationship of "links_to" exists between them THEN filter out that node.
I have Tried:
MATCH p =(c:Company {name:"example.com"})-[r]-(b:Company)
where NONE (x IN relationships(p) WHERE type(x) ="links_to")
RETURN p
The above query produces the graph in the image.
That filters out nodes where the ONLY relationship between them is "links_to" BUT it does not remove the nodes where there is another relationship as well(as you can see in the image)
So many other attempts but the same result.
Any idea how to do this?