title: sum of a field in mongodb using php yii2 ex
body: <p>I am using mongodb extension for yii2. I want to get the sum of a field <code>total</code> from mongodb collection.</p>
  
  <pre><code>$query = new Query;
  $rows = $query-&gt;select(['total'])-&gt;from('invoices')-&gt;where(['status' =&gt; 'Unpaid'])-&gt;sum('total'); 
  </code></pre>
  
  <p>But, I am getting zero every time, even though it is greater than zero. Is there any issue with my query?</p>