End to end test for period and group_by