def METHOD_NAME(self, query, results, columns):
    """
    Groups results using query group by clause.
    Args:
        query: input query
        results: query results
        columns: list of select columns
    Returns:
        results grouped using group by clause
    """
    METHOD_NAME = [column for column in columns if column.lower() in query["groupby"]]
    if METHOD_NAME:
        results = sorted(results, key=operator.itemgetter(*METHOD_NAME))
        return [list(value) for _, value in itertools.METHOD_NAME(results, operator.itemgetter(*METHOD_NAME))]
    return [results]