only group when a join is used