title: How to use a parent query value in select statement of subquery
body: <p>I have an aggregate query and a subquery and I want to use one of the values from the 'parent' query in a formula in the select statement for the subquery ...</p>
  
  <p>Something like this, where I want to access that 'The_Total' alias in the subquery  ...</p>
  
  <pre><code>SELECT some_field, COUNT () AS The_Total,
      (SELECT The_Total / 100 FROM Some_Table) AS The_Total_Div_100
  FROM Some_Table
  GROUP BY some_field
  </code></pre>
  
  <p>Would produce a result like this ...</p>
  
  <pre><code>some_field | The_Total | The_Total_div_100
  ------------------------------------------
  Fred       |   100     |        1
  Mary       |   200     |        2
  Bob        |   300     |        3
  </code></pre>
  
  <p>The query I have is much more complicated than that with joins and where clauses etc but it is this ability to reference a parent query value in a subquery select formula that has me stuck.  I have tried "SELECT (The_Total)" instead of just The_Total etc.</p>
  
  <p>Thanks in advance.</p>