title: how to convert count(*) and group by queries to yii and fetch data from it
body: <p>I want to convert this query in yii</p>
  
  <pre><code>SELECT count(*) AS cnt, date(dt) FROM tbl_log where status=2 GROUP BY date(dt) 
  </code></pre>
  
  <p>and fetch data from that. I try this command (<code>dt</code> is datetime field):</p>
  
  <pre><code>$criteria = new CDbCriteria();
  $criteria-&gt;select = 'count(*) as cnt, date(dt)';
  $criteria-&gt;group = 'date(dt)';
  $criteria-&gt;condition = 'status= 2';
  $visit_per_day = $this-&gt;findAll($criteria);
  </code></pre>
  
  <p>but no data will fetch!
  wath can I do to get data?</p>