我尝试了以下查询来获取总分(得分在字符串数组中,如 ("5","2"))作为主场得分和客场得分的总和。
match (e:Epl), (e1:Epl)
where ((e)-[:AWAY]->(e1) or (e1)-[:HOME]->(e)) and e.home=e1.away
return e.home,e1.away,
sum(toInteger(e.score[0])+ toInteger(e1.score[1])) as totalScore
我确实有两个节点之间的关系如下: 在此处输入图像描述
我想计算每支球队的总分(主客场得分之和)