title: How can I get the value of a SQL raw query in Django?
body: <p>I want to get the sum of a specific field using a raw sql query:</p>
  
  <pre><code>total_profit = queryset.raw('SELECT SUM("products_product"."profit") AS Total_Profit FROM "products_product"')
  </code></pre>
  
  <p>Using <code>total_profit.columns</code>, it returns <code>['total_profit']</code>. Although, I don't know how to access it.</p>
  
  <p>If I try <code>total_profit["total_profit"]</code>, I get the following error: </p>
  
  <pre><code>InvalidQuery: Raw query must include the primary key
  </code></pre>
  
  <p>I know that I can achieve the same result with Django ORM:</p>
  
  <pre><code>total_profit = queryset.aggregate(total_profit=Sum("profit"))
  </code></pre>