order operator

Sort the rows of the input table into order by one or more columns.

T | order by country asc, price desc

Note

The order operator is an alias to the sort operator. For more information, see sort operator

Syntax

T | order by column [asc | desc] [nulls first | nulls last] [, ...]

Arguments

  • T: The table input to sort.
  • column: Column of T by which to sort. The type of the values must be numeric, date, time or string.
  • asc Sort by into ascending order, low to high. The default is desc, descending high to low.
  • nulls first (the default for asc order) will place the null values at the beginning and nulls last (the default for desc order) will place the null values at the end.