Ordering of the results can also be achieved by using expressions.
Example 5.16.3 To sort the grades based on the second digit of the course
number, and, then on the first digit of the course number (which are the fourth
and the third characters of course numbers) we write: