Add group_by validation
Add tests for sort_by with period and group_by
Add collect validation