title: how to get the last node in path in neo4j?
body: <p>In this cypher query,the longest path/paths between nodes which have relationship with STATUS="on" property with each other,will be returned,but I want to get also the last node of the path/paths.</p>
  
  <p>query:</p>
  
  <pre><code>START n=node(*)
  MATCH p=n-[rels:INCLUDE*]-&gt;m 
  WHERE ALL (rel IN rels 
    WHERE rel.status='on') 
  WITH COLLECT(p) AS paths, MAX(length(p)) AS maxLength 
  RETURN FILTER(path IN paths 
    WHERE length(path)= maxLength) AS longestPaths
  </code></pre>
  
  <p>how should I add it to the query?
  thanks.</p>