aggregation: group export scrits by sub groups.