[英]Cypher Neo4j - How to identify instances of a relationship for a particular field
我正在嘗試學習用於圖數據庫的Cypher。
使用Neo4j的測試數據庫( http://www.neo4j.org/console?id=shakespeare ),如何找到特定戲劇的所有表演? 我正在嘗試確定尤利烏斯·凱撒(Julius Caesar)被執行了多少次。
我嘗試使用:
MATCH (title)<-[:PERFORMED]-(performance)
WHERE (title: "Julias Caesar")
RETURN title AS Productions;
我知道手動識別是很容易的,但是在更大范圍內是不可能的。
謝謝
您將不得不計算性能節點的數量。 您可以使用count
獲得節點數。
MATCH (t)<-[:PERFORMED]-(performance)
WHERE t.title = "Julias Caesar"
RETURN DISTINCT t AS Productions,count(performance) AS count_of_performance
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.