protected function executeAggregate($fn, $table, $field, $conditions)
    {
        $data = $this->selectAll($table, $conditions, $fn . '(' . $field . ')');
        return $data ? (float)current($data[0]) : 0.0;
    }