Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我有一条路径 A(wt=80)->B(wt=100)->C(wt=110)->D(wt=160)->E(wt=170) 我想找出所有此路径中具有 wt>=20 差异的节点。在这种情况下,它应该只给我 B 和 D。
您可以先获取每个关系的开始节点和结束节点,然后使用“Where”返回结束节点满足差异条件的那些关系的结束节点,如下所示,
Match p = a-[:Rel*]->e Where a.name?='A' With endNode(last(relationships(p))) as second, startNode(last(relationships(p))) as first Where second.wt - first.wt >= 20 Return second