In the fields parameter of the find invocation method, you can pass the field processed by the aggregated function. Example:
$Model->find('all', array( 'anything' => array(), 'fields' => array( 'SUM (Model.attribute) AS total', 'OTHERFUNCTION(OModel.other_attribute) AS other' ), 'otherthing' => array() ) );
source share