我正在尝试匹配多个节点,但我无法创建正确的查询。
此查询适用于david,但如何在david之后添加其他名称?比如约翰?
Match (p:People {peopleName:"david"})-[:PEOPLE_ASSOCIATED_PLACE]-(pl:Place)-[:PLACE_ASSOCIATED_EVENT]-(e:Event)
return p.peopleName, pl.placeName, e.eventTitle, e.eventDate order by e.eventDate desc
答案 0 :(得分:1)
我认为您只需要像SQL
一样使用WHERE子句MATCH (p:People)-[:PEOPLE_ASSOCIATED_PLACE]-(pl:Place)-[:PLACE_ASSOCIATED_EVENT]-(e:Event)
WHERE p.peopleName in ["david", "John"]
RETURN p.peopleName, pl.placeName, e.eventTitle, e.eventDate order by e.eventDate desc