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.
Window functions - SQL Tutorial
From the course: Fundamentals of Data Transformation for Data Engineering
Window functions
- [Instructor] In this lesson, we're going to jump into window functions. So hopefully had a chance to take a look at the window function refresher to understand a bit more about how window functions work, and maybe shake off a bit of the rust. So as usual, we'll get started with loading our database and we'll start with some sample questions that are well suited to window functions. So a good idea is understanding the types of questions that one might ask when they need a window function, and then mapping that pattern as you come across different types of data. For example, if we're asking which park has the most campsites? It may be in a data set of all the parks, that might be a good candidate for a window function, but more specifically, asking what's the second largest campsite in each park? Or what's the running total of alerts for all parks? Or even what's the seven day moving average of all alerts? These are all very well suited to window functions, because they involve having…
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)
-
-