0
連接兩個節點,我有以下節點由邊緣的Neo4j如何返回由邊緣
節點user
擁有財產user.id
節點chatitems
有屬性鏈接chatitems.id
我要收回user.id和chatitems.id
我試過
MATCH (user)-[:CreatesChat]-(chatitems)
WITH user as users ,chatitems as chats ORDER BY chatitems.id DESC LIMIT 10
WITH collect(chats) AS chats1
with collect(users) as users1
UNWIND chats1 AS chatid
unwind users1 as userid
return chatid,userid
但我得到的錯誤
users not defined (line 4, column 14 (offset: 158))
"with collect(users) as users1"
^
我怎樣才能解決這個問題?
你爲什麼要收集東西?第1行之後的'RETURN user.id,chatitems.id'有什麼問題? –