title: How to SUM Row values and save the result in a new Total Column?
body: <p>I need to calculate the sum of stock from some rows, the same product exist for different companies, so I need to calculate the SUM/Total of all products, per product name, this is the result that I want to achieve:</p>
  
  <pre><code>ID | Name     | Company | Stock | Total Stock
  1  | Product1 | Company1| 10    | 30
  2  | Product1 | Company2| 10    | 30
  3  | Product1 | Company2| 10    | 30
  4  | Product2 | Company1| 10    | 15
  5  | Product2 | Company2| 5     | 15
  6  | Product3 | Company2| 5     | 5
  7  | Product4 | Company1| 6     | 10
  8  | Product4 | Company2| 4     | 10
  </code></pre>
  
  <p>Etc...
  The Total Stock is the sum of <strong>Select SUM(Stock) From Product Where Name="Product1"</strong> 
  How can I save this result ? Should I use a Trigger Or a Procedure? I have basic knowledge of SQL</p>
  
  <p>This needs to run every 30 minutes or every time a row is updated.</p>
  
  <p>The product table has around 40.000 Products.</p>