title: I want create query using sum and substarct function in single query using multiple conditions using mysql
body: <p><img src="https://i.stack.imgur.com/nBPp1.png" alt="table ratecard"></p>
  
  <p>In the above table I want to sum where <code>ledgertype='Earning'</code> and substract where 
  <code>ledgertype='Deduction'</code> and display both values..... how to write query?  </p>
  
  <p>Thanks in advance...</p>