The <ORDERBY command orders the output rows according to the data values in the specified columns. Using an optional direction argument to the ORDERBY command, you can specify either an ascending order using the ASC flag, or descending order using the DESC flag. You can specify different sorting directions in different columns of the same report. If no direction argument is used, ascending (ASC) is the default order.
To determine the set of rows to be ordered, specify the row grouping dimension in the command. The default row grouping is the innermost row dimension.
Only one <ORDERBY is allowed per report, as terminated by the ! command. If a report script contains multiple reports, each <ORDERBY overwrites the one in the previous report.