You can order the data in a query by this entries.
You could order by a present field or by condition.
You can use value replacement in the where condition. See Replacing Value section.
- Field Order
Order by Query Field (Optional)
Order by Condition (Optional). This could be a non present field, or even complex calculations
Example: order with case
CASE WHEN FIELD = 'A' THEN 1 ELSE 0 END
- ASC – Ascending
- DESC – Descending
Defines the order of order by fields