Functions
SORTBY
Sorts an array based on the values in corresponding arrays
When to use it
When should I use SORTBY?
Use SORTBY to sort an array based on the values in one or more separate corresponding arrays, which lets you order data by an external key without it being part of the returned array.
Used in
Syntax
SORTBY(array, by_array1, [sort_order1], ...)