Add group by iterator problem