protected function maxMinAvgSum(string
$select = '', string
$alias = '', string
$type = 'MAX'
) { if ($select === ''
) { throw DataException::
forEmptyInputGiven('Select'
);
} if (strpos($select, ','
) !== false
) { throw DataException::
forInvalidArgument('column name not separated by comma'
);
} $type =
strtoupper($type);
if (!
in_array($type,
['MAX', 'MIN', 'AVG', 'SUM', 'COUNT'
], true
)) { throw new DatabaseException('Invalid function type: ' .
$type);
}