sort the messages in the query