【问题标题】:Cypher - calculate the correspondence between 2 entitiesCypher - 计算 2 个实体之间的对应关系
【发布时间】:2021-12-31 12:31:44
【问题描述】:

我是 Cypher 的新手,我的查询有点麻烦,所以我的查询包括计算两个实体之间的匹配数,我设法在 SQL 中完成它以便能够将其翻译成 Cypher 但我没有做不到... 这是我的 SQL 请求:

SELECT count(*) 
FROM Dogs 
INNER JOIN Cats ON condition

【问题讨论】:

标签: python sql neo4j cypher


【解决方案1】:

假设您的图表,这可能会做到这一点

(d:Dog)-[:condition]-(c:Cats) return count(*)

或者,如果您想按条件了解计数

(d:Dog)-[r:condition]-(c:Cats) return type(r) as condition, count(*) as ct

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-01-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多