title: How to get only the value from a Rails query
body: <p>I want to get the integer value from this query in rails.</p>
  
  <pre><code>Inventory.select(:amt_sold).where(item_ID:'GXZ44', store_id:'44555222')
  </code></pre>
  
  <p>On my controller, I am trying to select the amount sold from my inventory and I want to get only the integer value from the <code>amt_sold</code> column. When I run that query, I get: </p>
  
  <pre><code>&lt; Inventory id: nil, amt_sold: 175.0&gt; 
  </code></pre>
  
  <p>How can I just get the 175.0 value as a integer to be able to do arithmetic operations on it?  </p>