Skip to main content Link Search Menu Expand Document (external link)

Utility Functions - sort

Sections
  1. sort
  2. Example
    1. No sort (demo_table)
    2. Sort descending
    3. Sort ascending

sort

The ‘sort’ command sorts the default table by a given column. By default, the sort order is descending.

sort N <+/-><column>

The value N can be omitted to use the default of 1024. Plus/minus (+/-) signs are used to change between descending and ascending.

Example:

stream demo_table=example()
sort 5 -num_of_ints
// sort 5 num_of_ints // or use the 'default' option
export descending

use demo_table
sort 5 +num_of_ints
export ascending

Example

No sort (demo_table)

Sort descending

Sort ascending

Page last updated: 2022 Nov 15