title: Yii2 - find max based year in active record
body: <p>I want to select maximum an field which is integer in my db.</p>
  
  <p>So, First I try the orthodok's way :</p>
  
  <pre><code>SELECT max(a.nomor_surat) as max FROM request a
  WHERE YEAR(a.tanggal_persetujuan) = YEAR(CURDATE())
  </code></pre>
  
  <p>Works. (In my case : max = 3)</p>
  
  <p>Now, using AR,</p>
  
  <pre><code>Request::find()-&gt;select('max(nomor_surat) as max')-&gt;where(['YEAR(tanggal_persetujuan)' =&gt; 'YEAR(CURDATE())' ])-&gt;scalar();
  </code></pre>
  
  <p>I got max = 1, 
  How AR interpretatioin them correctly ?</p>
  
  <p>Pleas Advice.
  Thanks</p>