title: JOIN in a Cypher Query?
body: <p>It seems I do not understand OPTIONAL MATCH correctly.</p>
  
  <p>I have a node (t) that always exists. This node (t) can have relations to other nodes (q), (o) - maybe to both or just one of them. </p>
  
  <p>I am trying to catch in one statement something like</p>
  
  <p>"Show me all information for node (t) and if there is a related node (o) then also all of (o) and if there is a node (q) then also for (q) - if one of them is not available show what you have"</p>
  
  <p>I can do one of both qith a match and an optional match like</p>
  
  <pre><code>MATCH (t) -- (o) WHERE t.id = "1234" 
  OPTIONAL MATCH (t) -- (q) 
  RETURN q,t,o
  </code></pre>
  
  <p>I succeed when I have a path between (t) and (o) no matter if I have (q) or not. But I fail when I do not have (o) and though have (q). If I switch and put (q) in the first row and ((o) in the second its just vice versa, I always loose one of them.</p>
  
  <p>How would I need to query to get either both (o),(q) or just one of them no matter which of them are there?</p>
  
  <h3>EDIT</h3>
  
  <ol>
  <li>All nodes (t), (o) and (q) have additional labels</li>
  <li>I didnt put the query in the right way as I thought this doesnt matter, so the query which fails was
  MATCH (o:Label3) -- (t:Label1) WHERE t.id = "1234" 
  OPTIONAL MATCH (q:Label2) -- (t:Label1) 
  RETURN q,t,o</li>
  </ol>