Oracle provides a number of powerful analytic functions that can be used to accomplish requirements that may require a stored procedure to be implemented.
The analytic function calculates the aggregated values based on a set of data rows, which are different from the aggregate functions, and they return multiple rows of results for each group. The parse function is executed last in the query statement except for the ORDER BY clause. All joins and all where, GROUP by and having clauses are executed before the parse function. Therefore, the analysis function can only appear in the Select or ORDER BY clause.
All parts:
Analytic_function
Specify the name of the parse function, followed by all the analysis functions
Arguments
Analysis functions can have between 0 and 3 parameters. A parameter can be any numeric type or other non-numeric type that can be implicitly converted to a numeric type.
Analytic_clause
Using over analytic_clause indicates that a function operation is a query result set. If you want to filter query results based on analytic functions, you need to use nested subqueries.
Query_partition_clause
Use the partition BY clause to group the query result set based on one or more value_expr. If omitted, the parse function treats all rows as a group.
Order_by_clause
Use Order_by_claus to specify how the data is sorted in a group.
ASC (default) | DESC
NULLS First (default in DESC) | NULLS last (default in ASC)
Windowing_clause
Partial parsing functions allow the use of the Windowing_clause clause.
This clause can be specified only if Order_by_clause is specified.
rows specifies the window that uses the physical row
range specifies a window with a logical offset
Learn Oracle Analytic functions