title: How to nest a query with Neo4j?
body: <p>I am trying to do a sort of nested Neo4j query in Java, which first labels a subset of nodes and then tries to match certain patterns among them. More specifically it is like combining 2 queries of this type:</p>
  
  <p>1 - MATCH (n)-[r:RELATIONSHIP*1..3]->(m) set m:LABEL </p>
  
  <p>2 - MATCH (p:LABEL)-[r2:RELATIONSHIP]->(q:OTHERLABEL) where r2.time&lt;100 return p,r2,q</p>
  
  <p>Is there a way I can merge these two query in only one using the Java function engine.execute() ?</p>