ORDER BY clause sorts table rows based on one or more columns. ORDER BY 1 sorts by first column in SELECT list. Default sorting is ascending (lowest to highest)
Sheets allows sorting by alphabetical order (A-Z) or reverse order (Z-A). Data can be sorted by entire sheet or specific range. Header rows can be frozen to keep them visible during sorting
Pandas DataFrame is a data structure with labeled rows and columns. DataFrame indices start from zero and can be manually assigned. Default sorting algorithm is quicksort, stable sorting available with mergesort
SORT function sorts data arrays dynamically in ascending or descending order. Function requires array, sort_index, sort_order, and by_col arguments. Results automatically update when source data changes. Only available in Excel 365 and Excel 2021
Custom Sort feature available in Excel 365 through Excel 2007. Select table, click Sort & Filter > Custom Sort. Choose cell color and position, then add multiple levels. Sort by priority order using Copy Level button. Alternative method: use AutoFilter with Sort by color option
Excel's standard ascending sort arranges dates chronologically. Select dates without headers and expand selection when prompted