关于neo4j的一个问题。我正在实现数据,并且通过简单的密码查询,我想提取端节点相同的数据。 我有一个帐户ID的集合。 `
match (n) where n.ID IN ['4260890','04379258','04643207','2250893','228910','2290','225067003','2002755','225832','2138572','4174122','01884','06563','13397','5216','7789','236740']
WITH collect (n) as IDs
UNWIND IDs AS n
现在,我想查看哪个员工ID属于同一个部门。我试着这样做,
match (n)-[r:Has]-(v) with n, collect (v) as V
Unwind V as Vn
match (m)-[r:Has]-(Vm) with m, collect (Vm) as Va
unwind Va as Vm
Where Vm in Vn
AND NOT 'm'='n'
return distinct n.id as EmpId
collect (distinct Vm) as department
但问题是,我认为这个查询不正确。我在第二个where子句上有错误。 有人可以帮我找到一个集合的员工共享的相同部门。 谢谢你。