To set the sorting
Sorting criteria enable you to control the order in which found records will be displayed within each subset.
The Sorting window shows a check box for each output attribute of your selected subset. The marked attribute nearest the top of the list will be the primary sort parameter; records will be sorted first according to the values found for this attribute. The second marked attribute (if any) will be considered only when two records have identical values for the first criteria.