public function groupBy($fields)
    {
        if (!is_array($fields)) {
            $fields = $this->splitParts($fields);
        }

        foreach ($fields as $k => $field) {
            $fields[$k] = $this->db->quoteColumn($field);
        }

        $this->query['group'] = implode(',', $fields);

        return $this;
    }
public function groupBy($fields)
    {
        if (!is_array($fields)) {
            $fields = $this->splitParts($fields);
        }

        foreach ($fields as $k => $field) {
            $fields[$k] = $this->db->quoteColumn($field);
        }

        $this->query['group'] = implode(',', $fields);

        return $this;
    }
public function groupBy ( $ fields ) { if ( ! is_array ( $ fields ) ) { $ fields = $ this -> splitParts ( $ fields ) ; } foreach ( $ fields as $ k => $ field ) { $ fields [ $ k ] = $ this -> db -> quoteColumn ( $ field ) ; } $ this -> query [ 'group' ] = implode ( ',' , $ fields ) ; return $ this ; }
GROUP BY statement

@param string|array $fields
@return \Ark\Database\QueryBuilder
GROUP BY statement