Searching Topics for intellishell
Lesson 6, Exercise 2: Using the SQL Query tool to aggregate collection data
In this exercise, you’ll use SQL Query to build an SQL statement that aggregates data. After you run the statement, you’ll open the mongo shell code in the Aggregation Editor, where you’ll update a field name in two of the pipeline stages. To aggregate the collection data 1. Return to the SQL tab for the […]
Lesson 3, Exercise 5: Sorting the documents in the aggregation pipeline
In this exercise, you will add the fifth and last stage to the pipeline. The stage is based on the $sort aggregate operator, which lets you sort the documents in the pipeline, based on one or more fields. To sort the documents in the aggregation pipeline 1. On the Pipeline tab of the Aggregation Editor, […]
Exercise 1: Importing an aggregate statement into the Aggregation Editor
In this exercise, you’ll import the states_transactions.js file into the Aggregation Editor. The file contains the aggregate statement that you built in the first section of this course. You’ll use this statement as the foundation for all four exercises in this section, modifying the statement as you work through the last three exercises. To import […]
Lesson 3: Introducing the MongoDB aggregate method
MongoDB provides the aggregate method for aggregating the data in a collection. You call the MongoDB aggregate method from a collection object, like you saw with the MongoDB find method in the previous section. The following syntax shows the basic elements that make up an aggregate statement: db.getCollection(collection).aggregate(pipeline [, options]) To invoke the aggregate method, […]
Lesson 2, Exercise 2: Using Visual Query Builder to build and run find statements
In this exercise, you’ll use Visual Query Builder to build and run the final find statement that you created in the first exercise. By building the same statement, you’ll get a better sense of the step-by-step approach that you can use in Visual Query Builder to create queries, while seeing how the tool can help […]
Lesson 5, Exercise 2: Exporting a SQL query to the Aggregation Editor
In this exercise, you’ll export the mongo shell version of your SQL aggregate query to the Aggregation Editor, where you’ll review the components that make up the aggregate pipeline. You’ll then run the query and view the results. To export the SQL query 1. Go to the Query Code tab in the bottom section of the SQL tab. 2. Verify that […]