Click Add ORDER BY columns to specify the order in which you want the data in your buckets sorted. For example, you might use ORDER BY if you were interested in the numeric value of the items in your bucket such as the top 10 logins.
Tip: Fields in shown in italics on the Data Options panel are derived, referenced, or side table fields (rather than “hard event data” in the main database tables). See also, Data Fields and Variables.
The ORDER BY columns can be different than the ones you chose for the query data under SELECT. Also, you can apply functions to these columns.
Adding and editing fields and variables to order by works similarly to adding them for SELECT. See SELECT Query Fields.
Optionally, you can specify an aggregate function on a particular column of data to group by, such as a line item count, or in the case of numeric data, a sum or average.
You apply a function to ORDER BY columns the same as you do to a SELECT column, and the same functions are available depending on the fields or variables chosen. See SELECT Query Fields.
To specify a function for column data, double-click a field or variable in the top pane under “ORDER BY” and select a Function (from the drop-down menu) to apply to the column data.
Under ORDER BY you can also set the sort order on the fields/columns. By default, the sort order is ascending (ASC). You can change it to descending (DESC).