我是neo4j的新手,我不知道如何在cypher中使用'gruop by'功能.
我有这样的事情:
match(c:SEASON)<-[t:during]-(a:PLAYER)-[r:won]->(b:AWARD)
return r.year as year, t.team as team
Run Code Online (Sandbox Code Playgroud)
那让我回报:
year team
2011 OCK
2011 OCK
2011 LAS
2010 LAS
2010 SEA
2010 OCK
Run Code Online (Sandbox Code Playgroud)
我会这样的:
year team frequencies
2011 OCK 2
2011 LAS 1
2010 LAS 1
2010 SEA 1
2010 OCK 1
Run Code Online (Sandbox Code Playgroud)
我知道如何在SQL中完成它而不是在cypher中.我对同年频率最高的团队感兴趣,在本案例中是2011年的OCK.
提前致谢