I am having issues with homework in chapter 1 of this course, i created the pipeline variable and am trying to get a count of all the values that fit the aggregation filters

Hey @Ramone_Granston,

Since you are declaring a variable (var pipeline), you don’t need to use db.movies.aggregate.
You need to do:

var pipeline = [ { $match: { ... } } ]

and then


Let us know if you still have any doubts. Feel free to reach out for anything else as well.:smile:


1 Like

Yes, it worked i appreciate the help with this :smile:

1 Like

HI everyone,

I am on first chapter of the Aggreation Framework in the same lab when i am executing db.movies.findOne() to understand the schema it is giving me the error that i am not authorized to execute the command, am i doing something wrong here.

Most likely you are not using the appropriate database.

Use the command

use aggregations

to start using the aggregations database.

1 Like

What code did you use to connect to the database?

Actually i moved to another database which i was not authorized to use.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.