Building Complex Queries Using Aggregation

The focus of this chapter will be on a feature that's unique to MongoDB called the Aggregation Framework (https://www.mongodb.com/presentations/aggregation-framework-0?jmp=docs&_ga=2.166048830.1278448947.1531711178-137143613.1528093145), which is vital when forming complex queries. This feature allows database developers, or DBAs, to return subsets of data that are grouped, sorted, and filtered. We will start our discussion by forming a simple aggregation using single-purpose methods (https://docs.mongodb.com/manual/aggregation/#single-purpose-aggregation-operations). After that, we will get into the more complex topics of forming an aggregation pipeline (https://docs.mongodb.com/manual/aggregation/#aggregation-pipeline ...

Get MongoDB 4 Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.