public function getGroupByCols()
    {
        if (!$this->containsAggregates()) {
            return [$this];
        }
        $cols = [];
        foreach ($this->getSourceExpressions() as $sourceExpression) {
            $cols[] = $sourceExpression->getGroupByCols();
        }

        return $cols;
    }
public function getGroupByCols()
    {
        if (!$this->containsAggregates()) {
            return [$this];
        }
        $cols = [];
        foreach ($this->getSourceExpressions() as $sourceExpression) {
            $cols[] = $sourceExpression->getGroupByCols();
        }

        return $cols;
    }
public function getGroupByCols ( ) { if ( ! $ this -> containsAggregates ( ) ) { return [ $ this ] ; } $ cols = [ ] ; foreach ( $ this -> getSourceExpressions ( ) as $ sourceExpression ) { $ cols [ ] = $ sourceExpression -> getGroupByCols ( ) ; } return $ cols ; }
Retuns the fields to be used when this expression is used in a group by.

@since  1.1.0

@author Eddilbert Macharia (http://eddmash.com) <edd.cowan@gmail.com>
Retuns the fields to be used when this expression is used in a group by .