'Expands the GROUP BY clause required by the query.
This will usually be the set of all non-aggregate fields in the
return data. If the database backend supports grouping by the
primary key, and the query would be equivalent, the optimization
will be made automatically.'

def set_group_by(self):

    self.group_by = []
    for (col, _) in self.select:
        self.group_by.append(col)
