title: DoctrineSelect with Variable
body: <p>I'm trying something like this with doctrine:</p>
  <pre><code>SELECT 
      @myprice := cp.price,
      @compPrice1 := (SELECT cpt1.price FROM competitor_product AS cpt1 
                      WHERE cpt1.product_id = cp.product) as compPrice1 
      @compPrice1 / @myprice  AS price_diff
  FROM
      customer_product AS cp 
  WHERE 
      customer_id = 1;
  </code></pre>
  <p>My code until then:</p>
  <p>[my code until then]<img src="https://i.stack.imgur.com/Q6BMr.png" alt="1" /></p>
  <p>How can I set variable for use in calculate column?</p>
  <p>I've been looking for but found nothing about</p>