SQL: Analytical Vs Aggregate Functions

Published: 17 July 2020
on channel: GoLearningPoint
2,431
17

***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


On this page of the site you can watch the video online SQL: Analytical Vs Aggregate Functions with a duration of hours minute second in good quality, which was uploaded by the user GoLearningPoint 17 July 2020, share the link with friends and acquaintances, this video has already been watched 2,431 times on youtube and it was liked by 17 viewers. Enjoy your viewing!