简体   繁体   English

Neo4j Cypher查询,用于查找具有关系的连接节点

[英]Neo4j Cypher query for finding connected nodes with a relationship

I have to write a cypher query where I have employee node connected to each other. 我必须编写一个密码查询,其中我的员工节点相互连接。 What i want that I have to find the employees who are not connected with me but have most common connections. 我想要的是我必须找到与我没有联系但有最常见联系的员工。

Something like the following perhaps : 可能类似于以下内容:

MATCH (p1:Employee {name: "me"})-[:CONNECTED_TO]->(p2:Employee)<-[:CONNECTED_TO]-(p3:Employee)
WHERE NOT (p1)-[:CONNECTED_TO]-(p3)
AND p1 <> p3
RETURN p3.name AS Recommended, count(*) AS Strength ORDER BY Strength DESC

Hope this helps. 希望这可以帮助。

Regards, Tom 问候,汤姆

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Neo4j更高效的Cypher查询,用于查找具有关系的连接节点 - Neo4j more efficient Cypher query for finding connected nodes with a relationship 查找没有特定关系的节点(Cypher / neo4j) - Finding nodes that do not have specific relationship (Cypher/neo4j) Neo4j Cypher Query:查找连接到一个节点且具有 3 个以上其他关系的所有节点 - Neo4j Cypher Query: Finding all nodes, that are connected to a node, that has more than 3 other relationships Neo4j密码查询以找出连接的节点 - Neo4j cypher query to find out connected nodes Neo4j:检索连接到Neo4j Rest中的节点或通过Cypher的所有节点和关系 - Neo4j : Retrieving All Nodes and Relationship connected to a Node in Neo4j Rest OR through Cypher Neo4j Cypher查询查找未连接的节点太慢 - Neo4j Cypher query to find nodes that are not connected too slow Neo4j密码查询以查看给定节点是否已连接 - Neo4j cypher query to see whether given nodes are connected Neo4j-Cypher查询,用于基于时间戳查找所有下一个节点和关系 - Neo4j - Cypher query for finding all the next nodes and relationship based on timestamp Neo4j密码查询:具有指定节点和关系属性的AllShortestPaths - Neo4j cypher query: AllShortestPaths with specified nodes and relationship properties Neo4j Cypher查询基于特征增量查找节点 - Neo4j Cypher query for finding nodes based on characteristics deltas
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM