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

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