title: Yii2 math in \yii\db\Query()
body: <p>I want to do some math (divide, minus, plus...), and two or more fields' values are using a Yii database query like below. Can I do it like this?</p>
  
  <pre><code> $data = (new \yii\db\Query())
   -&gt;select([
    'date',
    'SUM( IF(status = "Passed", 1, 0) ) AS passed',
    'SUM( IF(status = "Failed", 1, 0) ) AS failed',
    'SUM( IF(status = "On Hold", 1, 0) ) AS onhold',
    'passed/onhold as selfsubmit',
    'COUNT(*) AS total'
   ])
   -&gt;from('qa3d')
   -&gt;groupBy('date')
   -&gt;all();
  </code></pre>