From the course: Advanced SQL – Window Functions

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Aggregate grouped functions

Aggregate grouped functions - SQL Tutorial

From the course: Advanced SQL – Window Functions

Start my 1-month free trial

Aggregate grouped functions

- [Instructor] Up until now, I've used Aggregate window functions as my go-to examples. That was deliberate. As aggregates seemed to be the most intuitive and familiar for most developers. However, this apparent familiarity is a double-edged sword that manages to confuse even the most experienced developers. And yes, I know I covered it already and still I would like to spend two more minutes refreshing group by processing and emphasize the difference between group aggregate and Window aggregate functions. First, the animal's table is evaluated by the FROM clause. It is then passed to the GROUP BY clause. GROUP BY marks all rows for grouping based on the grouping expression species in this case. Our set is then transformed from its normal table like shape into a hybrid structure where each group of unique species rows will correspond to a single output row. Instead of nine individual source rows we're now dealing with…

Contents