title: ALias on an inner join intermediate result
body: <p>My SQL query fails when I assign an alias to the result of a join.</p>
  
  <p>Here is the example:</p>
  
  <pre><code>SELECT 
      a, b, c 
  FROM 
      ((q 
  INNER JOIN 
      r ON q.x = r.y) AS IntermediateResult 
  INNER JOIN 
      s ON IntermediateResult.a = s.a)
  </code></pre>
  
  <p>Basically the alias seems not to be recognized in the second inner join.</p>
  
  <p>I am using Mysql</p>