title: Subtraction in same table in same row with where condition #SQL
body: <p>Using a SQL query to subtract in same table:</p>
  <p>Table1</p>
  <pre><code>grade   record  total_amount
  ------------------------------
  DSP     receipt     17258
  DSP     sales       16313
  OPC43   receipt     95442
  OPC43   sales       92856
  OPC53   receipt    371752
  OPC53   sales      368985
  PPC     receipt    156023
  PPC     sales      152803
  vajram  receipt     36100
  vajram  sales       36100
  </code></pre>
  <p>Answer needed</p>
  <pre><code> 945    DSP
  2586    OPC43
  2767    OPC53
  3220    PPC
     0    vajram
  </code></pre>