In this lesson, we will learn what the MongoDB Aggregation Framework is at a high level, and see examples that demonstrate some of the power the framework provides. We'll also discuss why you should learn the MongoDB Aggregation Framework. How and where MongoDB's query language and CRUD operations in the aggregation framework are related and where they differ, and why we use aggregation in this course. So what is the MongoDB Aggregation Framework? If we were to come up with a custom definition of MongoDB's Aggregation Framework, it might read something like, the Aggregation Framework is a framework that allows the developer to express functional pipelines that perform preparation, shaping and analysis of data. This is accomplished through the use of stages, which perform a specific action like grouping, sorting, shaping, and more. Along with using expressions, the functional units of logic in the aggregation framework. You'll learn about the myriad stages and expressions available throughout the course. We will now look at some examples showing different aggregations. We're not going to elaborate the details of the specific stages or expressions used in these examples, but rather give an overview of the power of the aggregation framework. First, let's look at how we would find the average age for customers with an account type of gold given the following sample schema, where we have a name, accountType, and age field. Looking at it, we can see that the two entries with an accountType of gold have ages 33 and 28, so average to 30.5. Here is the aggregation that expresses this. However, aside from analysis, we also said preparation and shaping. Later in the course we will work with the Titanic data set, a famous data set people use to develop models to try to predict survival. Here is a sample document to show the schema and data types. Performing some data exploration, we might want to ask the question, among survivors, which surname had the highest survival count? And this simple aggregation expresses what we want. It's succinct, powerful, and able to work with data without a lot of preprocessing. We will also see how we can turn a tree that looks like this with only leaf nodes into a tree that looks like this. And ultimately into a tree that looks like this, entirely within the aggregation framework. That covers what the MongoDB Aggregation Framework is at a high level. Remember, the examples we saw are only a small sample of the massive power that lies hidden within the aggregation framework. So let's discuss why you should learn aggregation. First and foremost, mastering the aggregation framework will allow you to perform powerful transformations and ask complex questions of your data at the database layer, typically resulting in faster answers with less bandwidth use. It also allows us to more easily work with big data, because we can shape and slice it. Let's look at how the MongoDB query framework for CRUD operations and the aggregation framework relate, and where they differ. They both allow for querying collections and basic shaping of the results. The aggregation framework also allows for powerful data derivation analysis and advanced shaping operations. One caveat, with the $out stage, the aggregation framework can technically create as well, and we'll cover that later on in the course. So why do we use aggregation in the course? The reasons we use aggregation in this course are simple. Much work in data science involves preparing data by the cleaning or deriving new information and asking questions of it. This is best accomplished within aggregation. Okay, let's summarize what we've discussed. We have learned that the Aggregation Framework provides a framework for preparation, shaping, and analysis. We've also discussed why you should learn the Aggregation Framework, where aggregation is similar and different to the MongoDB Query Framework, and why we use aggregation in this course. Best of luck.