title: SQL - Cast two alias in BigDecimal
body: <pre><code>SELECT SUM(IF(create_month = MONTH(NOW() - INTERVAL 1 MONTH)
            AND create_year = YEAR(NOW() - INTERVAL 1 MONTH), 1, 0)) AS lastmonth,
     SUM(IF(create_month = MONTH(NOW() - INTERVAL 2 MONTH)
            AND create_year = YEAR(NOW() - INTERVAL 2 MONTH), 1, 0)) AS lastmonth2
  FROM incident_view
  WHERE customer_company_name = "Company"
  </code></pre>
  
  <p>Hello everyone,</p>
  
  <p>how Can I cast the two results (lastmonth and lastmonth2, which are both Int) into the Bigdecimal type/double, or any other decimal type?</p>
  
  <p>Would appreciate some help.</p>
  
  <p>Cheers</p>