title: Describing a Cypher Query for multi-level relationship in Neo4j?
body: <p>I'm developing a small affiliate structure to understand the concept of graph databases better, as well learn Neo4J and see what it can offer me. I've been with RDBMS for years now and Cypher is pretty rough. I'm trying to build a very simple affiliate system: </p>
  
  <p>Affiliate Joe has referred Mary, Bob and Mark. So, i create all their nodes and create the "referred" relationship. Now Mary refers Julie, Jessica and Joan. Bob refers Billy and Baxter. Mark refers Michael and Marx. And their referrals keep referring people. </p>
  
  <p>For each referral that one of Joe's original referrals, Joe earns a "generation". His first generation is Mary, Bob and Mark. His second generation is Julie, Jessica, Joan, Billy, Baxter, Michael and Marx. </p>
  
  <p>Now, with a Cypher query, how can i discover his generations and, of course, discover their number? Their place in the tree? How can i know who is from his 3rd or 4th generation, and who they are? </p>
  
  <p>My mind is twisting here, hope you guys can help.</p>