The sort tranform is used to determine how to arrange events returned in a TQL search.
mql query | sort [<order>] <field>
Note
TQL was previously called MQL. You still use and see
mqlin TQL queries.
| Controls the order of the results. Must be > (descending order) or < (ascending order). When using key/value syntax, the strings “desc” or “asc” are also acceptable. This argument is optional, and, when omitted, will default to descending order. |
| The field that determines how search results are sorted. You may specify a set of fields here to sort on multiple fields. |
Query | Result |
|---|---|
| Search and return results for |
| Search and return results for |
Query | Result |
|---|---|
| Search and return results for |
Note
The sort transform can also be passed as a separate transform in a query, as shown in the following example.
Query | Result |
|---|---|
| First, search and return results for |