title: How to use where() condition with min() in ActiveQuery
body: <p>I am modifying this query to Yii2 <code>ActiveRecord</code>.</p>
  
  <pre><code>$query = "SELECT min(sorting_value) as sorting_value FROM table WHERE sorting_value&gt;'$variable'"
  </code></pre>
  
  <p>As far I have done this:</p>
  
  <pre><code>$queryValue = Mymodel::find()-&gt;min('sorting_value')-&gt;where(['sorting_value' &gt; $sort1]);
  </code></pre>
  
  <p>And it is showing this error:</p>
  
  <blockquote>
    <p>Call to a member function where() on a non-object</p>
  </blockquote>
  
  <p>How can I solve this issue. I can't use where condition with <code>min()</code> function.</p>