答案 0 :(得分:1)
您必须创建一个临时集合:
MATCH (p:Person)
WITH collect(p) AS persons
UNWIND range(1, size(persons)) AS i
RETURN i AS pos, (persons[i-1]).name AS name, (persons[i-1]).birthDay AS birthday
╒═════╤══════╤════════════╕
│"pos"│"name"│"birthday" │
╞═════╪══════╪════════════╡
│1 │"Raf" │"05/07/1992"│
├─────┼──────┼────────────┤
│2 │"Mary"│"10/08/1991"│
├─────┼──────┼────────────┤
│3 │"Luke"│"11/01/1995"│
└─────┴──────┴────────────┘