You are forcing the split by returning c, i.kit, count(i)
. And what graph database does absolutely makes sense. To get aggregate just return count(i)
And if for some odd reason you seek to get the result you are asking.
MATCH (c:Customers {name:'Paul Pogba'})-[:ORDERED]->(o:Orders)-[:BOUGHT]->(i:Items)
WITH collect(DISTINCT c) AS _c, collect(DISTINCT i) AS _i, count(i) AS count_i
UNWIND _c AS c
UNWIND _i AS i
RETURN c, i.kit, count_i
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…