Sorting on derived columns
When you want to use ORDER BY on an expression, you can
use either the display label assigned to the expression or an integer,
as Query and Query show.
The query retrieves the same data from the cust_calls table
as Query.
In the query, the ORDER BY clause causes the data to be displayed
in ascending order of the derived values in the span column,
as the result shows.
The following query uses an integer to represent
the result of the operation
res_dtime - call_dtime
and
retrieves the same rows that appear in the above result.