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 - SQL Tutorial
From the course: Fundamentals of Data Transformation for Data Engineering
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
-
-
-
-
(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)
-
-