MongoDB CRUD Operations: Modifying Query Results

Learn how to sort and limit query results and how to count documents in MongoDB.

MongoDB CRUD Operations: Modifying Query Results

Unit Overview

In this unit, you’ll learn how to modify query results in MongoDB by using sorts, limits, projections, and counts. First, you will learn how to organize query results by sorting and limiting the documents that are returned. Then you'll explore how to use projection to return selected fields from a query. Finally, you’ll learn how to count the number of documents that match a query. Using these query modifications will help enhance the functionality and performance of your applications.

Prerequisites

Lessons in This Unit

  • Lesson 01: Sorting and Limiting Query Results in MongoDB
  • Lesson 02: Returning Specific Data from a Query in MongoDB
  • Lesson 03: Counting Documents in a MongoDB Collection
  • 01.
    Lesson 1: Sorting and Limiting Query Results in MongoDB
    • Learn
    • Practice
  • 02.
    Lesson 2: Returning Specific Data from a Query in MongoDB
    • Learn
    • Practice
  • 03.
    Lesson 3: Counting Documents in a MongoDB Collection
    • Learn
    • Practice
  • 04.
    Conclusion
    • Learn
Camden Kirkland I Technical Instructor

Camden Kirkland I Technical Instructor

Cam is a Technical Instructor at MongoDB where he delivers courses for a wide variety of foundational and advanced topics on the database. Prior to MongoDB, he was a Curriculum Architect designing technical programs for web development, data analytics, and financial technologies for universities all over the country. In a past life he was a Chemist making sure your transformers didn't catch fire.

Emily Pope | Senior Curriculum Designer

Emily Pope | Senior Curriculum Designer

Emily is a Senior Curriculum Designer at MongoDB. Prior to MongoDB, Emily worked closely with professors at MIT and Columbia to design bootcamps in full stack development and data science at Emeritus. She also worked as an instructional designer on database and computer science learning experiences at Cengage. Emily loves learning about the everchanging tech space and is passionate about making these skills accessible to a global audience.

DG
October 23, 2023 5:42 PM


SR
October 23, 2023 12:34 AM

Quite handy

HK
October 20, 2023 3:37 PM


KP
October 19, 2023 11:28 AM


MP
October 15, 2023 11:09 AM


EC
October 13, 2023 11:30 PM