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.

Aggregations

Aggregations

- [Instructor] In this lesson we're going to talk about aggregations. And aggregations are really important. They might be the meat and kind of core of data transformation because aggregations help us describe things by the group that they exist in. And we'll get started by loading our dataset and we're going to have some fun digging into the parks table here. But we'll start with maybe the most basic aggregation, and that is count. And so if you run a count star, if you're just counting the number of rows that exists for some dataset. Here, we're counting the number of parks with a national park designation, but we can also count by state. And so if we run this query, which is grouping by state and ordering by the number of parks, so theoretically the states with the most parks should be at the top, you can see we get a nice result here. But this might not be the most accurate because as we saw before, states is actually a list of strings. Or rather it's just a single string…

Contents