title: add beetween option in $query in yii2
body: <p>I want use where in <code>$query</code></p>
  
  <pre><code>    $query-&gt;where(['and', "SUM(opportunity_conditions.money)&gt;=10", "SUM(opportunity_conditions.money)&lt;=100"]);
  </code></pre>
  
  <p>This is my $query : </p>
  
  <pre><code>   $query = (new \yii\db\Query())-&gt;select(['SUM(opportunity_conditions.money),(opportunity_conditions.money)', 'opportunity.id', 'opportunity.logo', 'profile_details.user_id', 'opportunity.name', 'profile_details.co_name', 'opportunity.address', 'opportunity.project_type_id', 'opportunity.state_id'])-&gt;from('opportunity ')-&gt;innerJoin('profile_details', 'opportunity.user_id=profile_details.user_id')-&gt;where('opportunity_conditions.who=2')-&gt;innerJoin('opportunity_conditions', 'opportunity.id=opportunity_conditions.opportunity_id')-&gt;addGroupBy('opportunity.id')-&gt;orderBy('opportunity.id desc');
  </code></pre>
  
  <p>I need my query has result where:</p>
  
  <pre><code> SUM(opportunity_conditions.money)&gt;=10 and SUM(opportunity_conditions.money)&lt;=100
  </code></pre>
  
  <p>This is my error :</p>
  
  <blockquote>
    <p>SQLSTATE[HY000]: General error: 1111 Invalid use of group function</p>
  </blockquote>
  
  <p>The SQL being executed was: </p>
  
  <pre><code>SELECT  SUM(opportunity_conditions.money),
          (opportunity_conditions.money),
          opportunity.id,
          opportunity.logo,
          profile_details.user_id,
          opportunity.name,
          profile_details.co_name,
          opportunity.address,
          opportunity.project_type_id,
          opportunity.state_id
  FROM opportunity 
  INNER JOIN profile_details 
      ON opportunity.user_id=profile_details.user_id 
  INNER JOIN opportunity_conditions 
      ON opportunity.id=opportunity_conditions.opportunity_id 
  WHERE 
      ((SUM(opportunity_conditions.id)&gt;=1) AND 
      (SUM(opportunity_conditions.id)&lt;=1)) AND 
      (opportunity.id IN (27, 28)) 
  GROUP BY opportunity.id 
  ORDER BY opportunity.id DESC
  </code></pre>