You can use standard SQL features within the same query to make your statements more sophisticated.
For example, you can use ordered analytical functions in the following ways:
- To populate a new column, use an analytic function in an INSERT … SELECT statement.
- To create a new table to participate in a complex query, use an analytic function in a derived table.
Ordered analytical functions having different sort expressions are evaluated one after another, reusing the same spool file. Different functions having the same sort expression are evaluated simultaneously.