title: How to get distinct nodes in a path in NEO4J?
body: <p>I am new to cypher and Neo4j I have trouble collecting all the distinct nodes in the path of Neo4j. </p>
  
  <pre><code>MATCH (e)
  WHERE SIZE((e:Customer)&lt;-[:Transaction]-()) &lt;&gt; 0
  AND SIZE(()&lt;-[:Transaction]-(e)) &lt;&gt; 0
  MATCH path = (e)&lt;-[:Transaction*10..15]-(e)
  with e,nodes(path) as nods return (how to return distinct of nods)
  </code></pre>
  
  <p>After getting the nodes from path how to get the distinct nodes in that path?</p>