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

Utility Functions - sort

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


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.


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


No sort (demo_table)

Sort descending

Sort ascending

Page last updated: 2022 Nov 15