title: How to find same nodes in neo4j?
body: <p>one question about neo4j. I am implementing the data and with a simple cypher query i want to extract the data where the end node is the same for example. 
  i have a collection of accountIDs.
  `</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Now, i want to see which employee id belongs to same department. i tried to do it like, </p>
  
  <pre><code>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
  </code></pre>
  
  <p>But the problem is, i think this query is not correct. I have error on 2nd where clause. 
  Can someone help me to find same department shared by the employees of one collection.
  Thanks in advnace.</p>