Matrix Sorting and BY-Group Processing Functions

SORT call

sorts a matrix by specified columns

SORTNDX call

creates a sorted index for a matrix

UNIQUEBY function

finds locations of unique BY groups in a sorted or indexed matrix