***Analytical Vs. Aggregate Functions
Aggregate Functions:
Aggregate functions return a single result row based on groups of rows.
Aggregate functions can appear in select lists and in ORDER BY and HAVING clauses.
They are commonly used with the GROUP BY clause in a SELECT statement.
Oracle applies the aggregate functions to each group of rows and returns a single result row for each group.
If you omit the GROUP BY clause, then Oracle applies aggregate functions in the select list to all the rows.
We use aggregate functions in the HAVING clause to eliminate groups from the output based on the results of
the aggregate functions.
Slower than Analytical Functions.
Analytical Functions:
Same number of rows as input.
The group of rows is called a window and is defined by the Analytic_clause.
The window determines the range of rows used to perform the calculations for the current row.
Analytic functions are the last set of operations performed in a query except for the final ORDER BY clause.
All joins and all WHERE, GROUP BY, and HAVING clauses are completed before the analytic functions are processed.
Faster than Aggregate Functions.
Home Page
https://tipsfororacle.blogspot.com
Analytical Vs. Aggregate Functions
https://tipsfororacle.blogspot.com/20...
More Examples
https://tipsfororacle.blogspot.com/20...
#GoLearningPoint