Process order
Analytic functions compute an aggregate value that is based on a group of rows, which are defined by a window. The window determines the range of rows the system uses to do the calculations. Window sizes can be based on a physical number of rows or a logical interval.
The system processes queries with analytic functions in three stages:
- Processes all JOINS, WHERE, and HAVING clauses.
- Makes the result set available to the analytic functions that do the calculations, which include finding the partition boundaries, ordering the rows within each partition, framing, and doing the aggregate calculations where appropriate.
- If the query has an ORDER BY clause, orders the output.