Order By Clause
The ORDER BY clause is an optional clause that comes after the HAVING clause and allows the retrieved rows to be sorted based on the value of a column.
To add a column to the ORDER BY list:
- Click on the column name
- Enter the sort key number, starting with 1 for the first sort key.
- Choose the sort order, Ascending (from lowest to highest for numbers and A to Z for strings) or Descending.
- Click on the Apply button to add the column to the ORDER BY list.
Repeat the above steps for each column you want to add to the ORDER BY list. To remove a column from the list of sort columns, choose the column in the
Clauses panel, and click the
Delete button.