title: How to calculate +ve and -ve amounts on Totals in SQL?
body: <p>The below <code>Product table</code>, <code>Product ID</code> - 100 as duplicated twice, and also there are negative profits are needs to <code>Substract</code> while calculating the <strong>Profit wise Total</strong>.</p>
  
  <pre><code>PID | Pname | Profit
  100     AB      20
  100     AB      20
  101     BC      30
  102     CD     -10
  103     DE     -10
  </code></pre>
  
  <p>Expected Result: 30</p>
  
  <p>Please provide the <code>SQL query</code> to get this result. Thanks in advance!!!</p>