title: Comparing data/running a "difference report" on data in same table
body: <p>I have a table called "items"</p>
  
  <pre><code>id       month       year       **itemname**       distmoney
   1        12         2012         chicken           20
   2        12         2012         pork              15
   3        11         2012         chicken           21
   4        11         2012         pork              15
  </code></pre>
  
  <p>I am trying to run a "difference report" on items with the same name. </p>
  
  <p>So for chicken, it is found in month 12 &amp; 11. If distmoney is different for these two months, i want to echo a warning or something of that nature. In my example above, distmoney for chicken is 20 for month 12 but 21 for month 11. So, a "warning!" should be echoed. For pork, however, distmoney remains the same so I would just echo "no issues" or something of the sort.</p>
  
  <p>How can I go about doing this?</p>
  
  <p>Thanks for any help. It is much appreciated.</p>