add in group by for dates