Use the ORDER BY clause to specify the order in which the records appear in a query.


"~FullName" ASC

(For a List in which the records are displayed in ascending order, by FullName. (The ASC and DESC keywords are optional—if neither is included, ASC is assumed.))

To sort the data by multiple fields, specify a comma-separated list:


"~RecordTime" DESC, "SeqNo" DESC

(For an Events List in which the records are displayed in descending order by both record time and the sequence in which events that have the same time stamp occurred.)

Whenever an alias is assigned to a field (see SELECT Clause), remember to specify that alias, rather than the field name, in the ORDER BY clause.

The GROUP BY clause—is a clause that you might want to consider using for producing complex queries.


ClearSCADA 2017 R2