Finding records where one attribute is greater than another
<p>I want to find any product that has a higher <code>ip_solid</code> than <code>ip_liquid</code>. </p>

<p>I am trying to do the following:</p>

<pre><code>Product.where("ip_solid &gt; ?", :ip_liquid).count
</code></pre>

<p>However, it seems that <code>:ip_liquid</code> is not being read out from each object, and is probably evaluating to 0 or nil. Is something like this even possible?</p>