add secondary sort order to "groupBy"