src/Query/SelectQuery.php
public function groupBy($fields, $direction = false)
    {
        $this->groupBy->addFields($fields, $direction);

        return $this;
    }
public function groupBy($fields, $direction = false)
    {
        $this->groupBy->addFields($fields, $direction);

        return $this;
    }
public function groupBy ( $ fields , $ direction = false ) { $ this -> groupBy -> addFields ( $ fields , $ direction ) ; return $ this ; }
Sets the group by fields for the query.

@param string|array $fields
@param string       $direction

@return self
Sets the group by fields for the query .