Add buildGroupBySQL default implementation back in