title: Neo4j: Recursive query for simple node structure
body: <p>Let us say we have a entity/node structure:</p>
  
  <pre><code>Emp: e_id, e_name, e_bossid
  </code></pre>
  
  <p>In Neo4j I have nodes with this structure and relationship <code>e_bossid-&gt;[reports_to]-&gt;e_id</code>.
  I want to construct a recursive query in neo4j that would be equivalent to the following sql recursive query:</p>
  
  <pre><code> WITH RECURSIVE Emp_CTE AS (
          SELECT e_id, e_name, e_bossid, w_id, w_s1, w_s2, w_s3, w_s4, w_s5
          FROM empfull
          WHERE e_bossid IS NULL
          UNION ALL
          SELECT e.e_id, e.e_name, e.e_bossid, e.w_id, e.w_s1, e.w_s2, e.w_s3, e.w_s4, e.w_s5
          FROM empfull e
          INNER JOIN Emp_CTE ecte ON ecte.e_id = e.e_bossid
  )
  
  SELECT *
  FROM Emp_CTE LIMIT 1000 OFFSET 1
  ;
  </code></pre>
  
  <p><strong>How would this query look like in Neo4j cypher?</strong></p>