OrderBy:

 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.

 

Parameters:

  • Field
  • Condition
  • Order 
  • Field Order

Field:

Order by Query Field (Optional)

Condition:

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 

Order:

  • ASC – Ascending
  • DESC – Descending

Field Order:

Defines the order of order by fields