title: How to get the sum of elements from a request with Propel?
body: <p>I'm trying to get the sum of variables contained in my object, and I don't know how to do it. I know it's not very clear, so here is an example.</p>
  
  <p>I'm doing a request to obtain all discounts from one User. I now want to get the sum of all the discounts he had. In SQL, it would be:</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT SUM(c.discount_price) AS SumDiscounts FROM my_table c GROUP BY c.user_id
  </code></pre>
  
  <p>How can I do it in propel?</p>