Sort - Sorting of records means to arrange records either in descending or ascending order according to the specified key. If the key is of string type, then the data will be sorted in alphabetical order. If the key is of numeric type, the data will be sorted according to value of the number. And if it is of date type, the data will be sorted from latest to oldest or vice versa.