Sort the data