title: How to add result of two sum case statements?
body: <p>I am preparing a report where i need to add the result of two case statements and show it in new column.</p>
  
  <p>i tried doing this : SUM('4MPBS') +SUM('8MBPS')  AS total
  but not giving correct figures.</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT DATE(bc.cycle_start_date) AS cycle,
  SUM(CASE WHEN bib.`broadbandPlan`='Smart Broadband - 2MB' THEN bib.`itemDisplayValue` ELSE 0 END) AS 2MBPS,
  SUM(CASE WHEN bib.`broadbandPlan`='Smart Broadband - 4MB' THEN bib.`itemDisplayValue` ELSE 0 END) AS 4MBPS,
  SUM(CASE WHEN bib.`broadbandPlan`='Smart Broadband - 8MB' THEN bib.`itemDisplayValue` ELSE 0 END) AS 8MBPS,
  SUM(CASE WHEN bib.`broadbandPlan`='Smart Broadband - 16MB' THEN bib.`itemDisplayValue` ELSE 0 END) AS 16MBPS,
  SUM(CASE WHEN bib.`broadbandPlan`='Smart Broadband - 25MB' THEN bib.`itemDisplayValue` ELSE 0 END) AS 25MBPS,
  SUM(CASE WHEN bib.`broadbandPlan`='Smart Broadband - 50MB' THEN bib.`itemDisplayValue` ELSE 0 END) AS 50MBPS,
  SUM( CASE WHEN bib.`category`='Discount Monthly Charges' THEN (bib.`itemDisplayValue`*-1) ELSE 0 END) AS discount,
   SUM('4MPBS') +SUM('8MBPS')  AS total
  FROM `broadband_invoicebreakdown` bib,`broadband_invoicedetails` bid,`broadbandcycle` bc
  WHERE bib.`invoiceId`=bid.invoiceid AND bid.cycleid=bc.cycle_id AND bc.cycle_type !='U'
  GROUP BY bc.cycle_type
  </code></pre>
  
  <p>The result i am getting is below .The total of 3rd and 4th column is coming wrong.</p>
  
  <p>cycle       2MBPS   4MBPS     8MBPS     16MBPS    25MBPS   50MBPS   discount   total  </p>
  
  <hr>
  
  <p>2019-04-01  0.00    116.88    260.00    272.00    940.64   0.00     0.00          <strong>2472</strong>
  2019-03-15  0.00    95295.20  34740.00  22644.00  8268.96  4050.00  0.00         <strong>44544</strong>
  2019-03-22  0.00    41745.00  15710.00  8704.00   2668.76  3712.50  0.00         <strong>21996</strong></p>
  
  <p>It should come like:</p>
  
  <p>cycle       2MBPS   4MBPS     8MBPS     16MBPS    25MBPS   50MBPS   discount   total  </p>
  
  <hr>
  
  <p>2019-04-01  0.00    116.88    260.00    272.00    940.64   0.00     0.00          <strong>376.88</strong>
  2019-03-15  0.00    95295.20  34740.00  22644.00  8268.96  4050.00  0.00         <strong>13003.00</strong>
  2019-03-22  0.00    41745.00  15710.00  8704.00   2668.76  3712.50  0.00
  <strong>57455.00</strong></p>