It takes the general form of SELECT <talias>.<field>, … FROM <table> AS <talias>, … WHERE <selection equation> ORDER BY <talias>.<field>, …
The sorting order is defined by the ORDER BY clause telling which fields are used to sort the records. The leftmost field is the first key considered, then equal records are sorted on the second field, etc.