From the course: Fundamentals of Data Transformation for Data Engineering
Unlock the full course today
Join today to access over 24,100 courses taught by industry experts.
Windows functions: A quick refresher - SQL Tutorial
From the course: Fundamentals of Data Transformation for Data Engineering
Windows functions: A quick refresher
- [Instructor] So before we jump into window functions, I want to provide a quick refresher if you're a bit rusty or if you haven't worked with Window functions in a while, because they can be tricky. And SQL Windows are kind of just like aggregates, but they're aggregates within these things called partitions. So taking MAX, you know, performing that aggregation is both a window and an aggregate, but if you don't specify any partition, you're just taking the MAX of the entire data set and the order is predefined by the function. There is an order in a MAX function. But something like a FIRST_VLAUE can have an order because the FIRST_VALUE function returns the first value of what you're selecting from just like the name would suggest. It can have an order, a partition or a frame, and we'll talk more about those attributes later. But comparing the two are MAX, which is just getting the largest value in a column. And something like a FIRST_VALUE, which is over some frame where we might…
Contents
-
-
-
-
(Locked)
DuckDB basics and query structure4m 2s
-
(Locked)
Wrangling unstructured data10m 30s
-
(Locked)
Joins and comparisons10m 19s
-
(Locked)
Aggregations10m 16s
-
(Locked)
Windows functions: A quick refresher5m 41s
-
(Locked)
Window functions10m 15s
-
(Locked)
Advanced filters3m 9s
-
(Locked)
Advanced joins8m 12s
-
(Locked)
Lambdas and UDFs10m 3s
-
(Locked)
Data generation4m 52s
-
(Locked)
SQL challenge2m 37s
-
(Locked)
SQL solution13m 8s
-
(Locked)
-
-