0
我想獲得每個節點的行數。 我使用下面的暗號:多個密碼匹配查詢來獲得行數
MATCH (p:Product) WHERE p.modifiedDTS > 10
RETURN {productCount: count(p)};
我如何使用多個不相關的比賽嗎?
MATCH (p:Product)
MATCH (i:Item)
WHERE p.modifiedDTS > 10
RETURN {productCount: count(p) ,itemCount: count(i)}
返回0作爲結果,但應爲productCount返回1。
找到了一個解決方案,但可能有更好的選擇。
MATCH(p:Product) where p.modifiedDTS > 10
Return count(p) as count, "product" as node
UNION ALL
MATCH(i:Item) where i.modifiedDTS > 10
Return count(i) as count, "item" as node
賓果....這就是我需要的。謝謝! –