title: Unable to use Case statement in Mysql select query?
body: <p>Here is my query and Grouping by Transaction type C for Credit and D for Debit and </p>
  
  <pre><code>SELECT 
  case 
  WHEN ACT.TRANSACTIONTYPE='C' THEN SUM(ACT.AMOUNT) END AS CreditBalance,
  case 
  WHEN ACT.TRANSACTIONTYPE='D' THEN SUM(ACT.AMOUNT) END AS DebitBalance
  FROM accounttransaction ACT 
  WHERE ACT.TRANSACTIONTYPE IS NOT NULL
  GROUP BY ACT.TRANSACTIONTYPE;
  </code></pre>
  
  <p>Below is my result</p>
  
  <pre><code>CreditBalance DebitBalance
  16536          NULL
  NULL           9673
  </code></pre>
  
  <p>Now I want to Subtract the balance of the A/C then I need to show as Current Balance
  Account transaction table includes Accountnumber,transactiontype and amount</p>