Sort results of stats_by by group field