The Order in Which the Analytical Function Is Processed in the SQL Statement : Introduction « Analytical Functions « Oracle PL/SQL Tutorial






SELECT
FROM x
WHERE

is executed by the database engine by

scanning a table, x, and

retrieving rows when the WHERE clause is true.

WHERE is often called a "row filter."

The SELECT .. FROM .. WHERE may contain joins and GROUP BY as well as WHERE.

If there were GROUPING and HAVING clauses, then the criteria in HAVING would be applied after the result of the SELECT .. WHERE is completed.

HAVING is often called an "after filter".

HAVING is after the WHERE, and after the GROUP BY is executed.

The ordering is done last, after the result set has been established from SELECT .. FROM .. WHERE .. HAVING.

The analytical function is performed just before the ORDER BY.

All grouping, joins, WHERE clauses, and HAVING clauses will have already been applied.









16.1.Introduction
16.1.1.The Analytical Functions in Oracle (Analytical Functions I)
16.1.2.The Order in Which the Analytical Function Is Processed in the SQL Statement
16.1.3.Using the Analytic Functions
16.1.4.Using the Ranking Functions
16.1.5.More Than One Analytical Function May Be Used in a Single Statement
16.1.6.Calculate with Analytical functions