title: SELECT SUM() with conditions in mysql
body: <p>Suppose I have </p>
  
  <pre><code>SELECT `Type`, `Originating Country Code`,`Originating Currency Code`, SUM(`Principal Amount`) as Total 
  FROM `colab` 
  WHERE (`Destination Country Code`='PH' 
      AND `Destination Currency Code`='PHP'
      AND `Type` = 'PAID') || (`Destination Country Code`='PH' 
      AND `Destination Currency Code`='USD'
      AND `Type`= 'PAID')
      GROUP BY `Type`
  </code></pre>
  
  <p>that working fine and returns true please see below</p>
  
  <pre><code>country_code | Currency_Code  |   Type    |  Principal
  
  =======================================================
  | PH         |   PHP          |    PAID   |    200
  =======================================================
  </code></pre>
  
  <p>My Problem is I want to seperate the total principal amount of Currency with USD values. Please see the records inside my database</p>
  
  <pre><code>country_code | Currency_Code  |   Type    |  Principal
  
  =======================================================
  | PH         |   PHP          |    PAID   |    100
  | PH         |   USD          |    PAID   |    100
  =======================================================
  </code></pre>