in Yii's criteria how to get count (*)

php, sql, yii

Solution

Work's with alias. Yii 1.1.11. Fails other

$criteria= new CDbCriteria();
$criteria=array(
            'group'=>'attribute',
            'select'=>'id,count(*) AS cc'
);

Problem

I'm trying to build a query that has a `group by` attribute, im truing to get the `id` and the `count` it keeps telling me that the `count (*)` is invalid column name how could i get the `count` from the `group by` query ??

Original source