title: sql query to calculate monthly growth percentage
body: <p>I need to build a query with 4 columns (sql 2005).</p>
  
  <pre><code>Column1: Product
  Column2: Units sold
  Column3: Growth from previous month (in %)
  Column4: Growth from same month last year (in %)
  </code></pre>
  
  <p>In my table the year and months have custom integer values. For example, the most current month is 146 - but also the table has a year (eg 2011) column and month (eg 7) column.</p>
  
  <p>Is it possible to get this done in one query or do i need to start employing temp tables etc??</p>
  
  <p>Appreciate any help.</p>
  
  <p>thanks,</p>
  
  <p>KS</p>