order

Sorts the specific fields to be printed out in the specified order, and displays the remaining fields in lexicographical order.

Syntax

order FIELD, ...
Required Parameters
FIELD, ...
Names of fields to be ordered in order, separated by a comma (,). The command sorts the fields that are not listed here in lexicographical order.

Usage

  1. Define the field output order of the sys_cpu_logs table as kernel, idle, user, _time, _table, and _id.

    table sys_cpu_logs | order kernel, idle, user, _time, _table, _id
    
  2. Define the field output order of the sys_cpu_logs table as idle, kernel and then the rest in lexicographical order

    table sys_cpu_logs | order idle, kernel