title: Django: Calculate the Sum of the column values through query
body: <p>I have a model</p>
  
  <pre><code>class ItemPrice( models.Model ):
       price = models.DecimalField ( max_digits = 8, decimal_places=2 )
       ....
  </code></pre>
  
  <p>I tried this to calculate the sum of <code>price</code> in this queryset:</p>
  
  <pre><code>items = ItemPrice.objects.all().annotate(Sum('price'))
  </code></pre>
  
  <p>what's wrong in this query? or is there any other way to calculate the Sum of <code>price</code> column? </p>
  
  <p>I know this can be done by using for loop on queryset but i need an elegant solution.</p>
  
  <p>Thanks!</p>