groupBy() public method
Sets the GROUP BY part of the query. See also addGroupBy().
public $this groupBy ( $columns )$columns
string|array|yii\db\Expression
The columns to be grouped by. Columns can be specified in either a string (e.g. "id, name") or an array (e.g. ['id', 'name']). The method will automatically quote the column names unless a column contains some parenthesis (which means the column contains a DB expression). Note that if your group-by is an expression containing comma