title: Sum of dynamically generated fields in MySQL query
body: <p>This is my query of dynamically calculated fields:</p>
  
  <pre><code>SELECT 5 * (`Mean (all)` +0.01735568 )/(0.07268901) AS rank1, 
  5 * (`CVaR 95` +0.51612 )/(0.53212) AS rank2, 
  5 * (`Hurst` - 0.2 )/(0.7717653) AS rank3, 
  5 * (`MaxDD` +6.200000762939453 )/(16.200000762939) AS rank4, 
  5 * (`Positive % 12` - 0.3 )/(1) AS rank5
  FROM `quant1`
  </code></pre>
  
  <p>It works fine, but I need to add another dynamic field which is equal to rank1+rank2...+rank 5. So, I am adding another field like</p>
  
  <pre><code>SELECT 5 * (`Mean (all)` +0.01735568 )/(0.07268901) AS rank1, 
  5 * (`CVaR 95` +0.51612 )/(0.53212) AS rank2, 
  5 * (`Hurst` - 0.2 )/(0.7717653) AS rank3, 
  5 * (`MaxDD` +6.200000762939453 )/(16.200000762939) AS rank4, 
  5 * (`Positive % 12` - 0.3 )/(1) AS rank5,
  rank1+rank2+rank3+rank4+rank5 AS rank
  FROM `quant1`
  </code></pre>
  
  <p>It generates an error "unknown column rank1". Interesting that exactly the same query works fine with MS Access.</p>
  
  <p>How can I fix this?</p>
  
  <p>Thanks! </p>