=SORT(array, [sort_index], [sort_order]) returns the array sorted. sort_index is the column number inside the array (1 for its first column) and sort_order is 1 for ascending or -1 for descending.
=SORTBY(array, by_array, [sort_order]) sorts by a separate range, which doesn't have to be part of the result. That's how you list rep names in order of revenue without showing the revenue.
Unlike Data > Sort, these leave the original rows alone and keep the result sorted when the data changes. To keep the top few rows, wrap the sort in TAKE(..., 3).