Fix get_aggregated_columns_for_group_by

This needs to return a list.
Naming of db.utils doesn't make sense