title: Main query results in Subquery
body: <p>How can we use reference of main query result set as a source table in subquery</p>
  
  <p>Table A, Table C</p>
  
  <pre><code>Select 
         (Select * From a) 
    From 
         (Select tabA.* 
            From A tabA 
            Join C tabC 
              On tabA.id = tabC.id) as a
  </code></pre>
  
  <p>I got invalid object a error here</p>