title: Why does the `WITH` clause need to be reminded about the variable in Cypher?
body: <p>Say in <code>group</code> property I have values <code>cat dog</code> and <code>chicken egg</code>. I want to assign to property <code>gid</code> the initial characters of the values in <code>group</code>, i.e. <code>cd</code> and <code>ce</code>. This is my query:</p>
  <pre class="lang-sql prettyprint-override"><code>match (n) 
  with split(n.group,&quot; &quot;) as array 
  set n.gid=left(array[0],1)+left(array[1],1) 
  return n.name, n.gid;
  </code></pre>
  <p>I get this error:</p>
  <pre><code>Variable `n` not defined (line 2, column 48 (offset: 48))
  &quot;match (n) with split(n.group,&quot; &quot;) as array set n.gid=left(array[0],1)+left(array[1],1) return n.name, n.gid;&quot;
                                                  ^
  </code></pre>
  <p>However, this works:</p>
  <pre class="lang-sql prettyprint-override"><code>match (n) 
  with n, split(n.group,&quot; &quot;) as array 
  set n.gid=left(array[0],1)+left(array[1],1) 
  return n.name, n.gid;
  </code></pre>
  <p>I don't understand why is that? I check the <a href="https://neo4j.com/docs/cypher-manual/current/clauses/with/" rel="nofollow noreferrer" title="WITH - Neo4j Cypher Manual"><code>WITH</code></a> documentation but I don't see any problem?</p>