Add grouping by snapshots