title: Query SQL for stock quantity
body: <p>I have this db table</p>
  
  <pre><code>ORDER_DATE PRODUCT_ID  QTY ACTION LOT
  2017-03-01    A         5    A     01
  2017-03-02    A         3    R     01
  2017-03-02    A         4    A     02
  2017-03-03    B         3    A     C1
  2017-03-04    B         3    A     C2
  </code></pre>
  
  <p>I have a product (PRODUCT_ID) and I can Add or Remove (Action) a certain quantity (QTY) in the various lots (LOT).</p>
  
  <p>I would like to create a SQL Query for knowing the total amount of a product in stock for each lot.</p>
  
  <p>Thanks for your support.</p>