ORDER BY
Overview
Order by allows you to sort your search results based on an indexed field - you can sort by clicking the search header in the grid to sort by a single column, but if you wish to sort by more than one column you need to use TQL.
Syntax
ORDER BY has a syntax that is similar to SQL and JQL query languages:
Code Block |
---|
|
<Expression> ORDER BY <FieldName> [ ASC | DESC ] , <FieldName2> [ ASC | DESC ] ...
|
Examples
Order by Last Updated At (descending order, newest first) and the name Ascending (A to Z):
Code Block |
---|
|
ORDER BY LastUpdatedAt DESC, Name ASC
|
Order entities in the same order as they appear within the "Explorer" tree:
Code Block |
---|
|
ORDER BY OrderNumber ASC
|