ORDER BY
Sorts the results in ascending or descending order, based on 1 or more fields. WQL sorts data alphabetically, not logically. When you don't include an ORDER BY clause, WQL sorts using a default internal record ID.
Syntax
ORDER BY field1 ASC, field2 DESC
Arguments
Argument | Description |
|---|---|
field1 , field2 , ...fieldN
| The aliases for the fields by which you want to sort your results. |
ASC
DESC | Sort results in ascending or descending alphabetical order. When you convert a report with no sort field to WQL, the conversion doesn't insert an ORDER BYclause. WQL sorts the query using the default internal record ID. |