protected function buildGroupBy()
    {
        if (count($this->groupBy) === 0) {
            return '';
        }

        $groups = [];
        foreach ($this->groupBy as $groupBy) {
            $groupBy = $this->quoteIdentifier($groupBy['tableName']) . '.' . $this->quoteIdentifier($groupBy['key']);
            $groups[] = $groupBy;
        }
        return 'GROUP BY ' . implode(', ', $groups);
    }
protected function buildGroupBy()
    {
        if (count($this->groupBy) === 0) {
            return '';
        }

        $groups = [];
        foreach ($this->groupBy as $groupBy) {
            $groupBy = $this->quoteIdentifier($groupBy['tableName']) . '.' . $this->quoteIdentifier($groupBy['key']);
            $groups[] = $groupBy;
        }
        return 'GROUP BY ' . implode(', ', $groups);
    }
protected function buildGroupBy ( ) { if ( count ( $ this -> groupBy ) === 0 ) { return '' ; } $ groups = [ ] ; foreach ( $ this -> groupBy as $ groupBy ) { $ groupBy = $ this -> quoteIdentifier ( $ groupBy [ 'tableName' ] ) . '.' . $ this -> quoteIdentifier ( $ groupBy [ 'key' ] ) ; $ groups [ ] = $ groupBy ; } return 'GROUP BY ' . implode ( ', ' , $ groups ) ; }
Build and return the group by string.

@return string
Build and return the group by string .