def _render_groupings(fields):
    """Render the group by part of a query.

    Parameters
    ----------
    fields : list
        A list of fields to group by.

    Returns
    -------
    str
        A string that represents the "group by" part of a query.
    """
    if not fields:
        return ''
    return 'GROUP BY ' + ', '.join(fields)
