title: Calculating a simple sum with Core Data
body: <p>I have a simple Core Data store with an entity Cost with an integer property "value". I want to sum up all amounts of the costs in my store, which is equivalent to the following sql statement:</p>
  
  <pre><code>SELECT sum(value) FROM costs
  </code></pre>
  
  <p>How do I do it the most efficient way in Cocoa Touch? By using Core Data? Or just get all cost entities and do the summation manually?</p>