title: Update table with subquery
body: <p>I hava the following table in database (Access - Microsoft SQL Server):</p>
  
  <pre><code>| Product Id |  Month    | Sales |
  ----------------------------------
  | 1144       |  1        | 100   |
  | 20131120   |  1        | 200   |
  | 1144       |  2        | 333   |
  | 1144       |  3        | 333   |
  | 1144       |  4        | 333   |
  | 1144       |  5        | 333   |
  | 20131120   |  2        | 200   |
  </code></pre>
  
  <p>And I would like to add to the table new column which will show in how many months each products has been sold till particular month. I need to keep this information in database, in this table.</p>
  
  <p>After updating table I would like to get the table:</p>
  
  <pre><code>| Product Id |  Month    | Sales | Counter |
  -------------------------------------------|
  | 1144       |  1        | 100   |   0     |
  | 20131120   |  1        | 200   |   0     |
  | 1144       |  2        | 333   |   1     |
  | 1144       |  3        | 333   |   2     |
  | 1144       |  4        | 333   |   3     |
  | 1144       |  5        | 333   |   4     |
  | 20131120   |  2        | 200   |   1     |
  </code></pre>
  
  <p>For example, for product=1144 and month=3, counter=2 because this item has appeared twice till 3 month. </p>
  
  <p>I would like to update column Counter with one query (update set = (select ... )). Could you help me to construct the query ?</p>