Issue in Chapter 4, Lab 1 problem

To complete this exercise connect to your Atlas cluster using the in-browser IDE space at the end of this chapter.

How many trips in the sample_training.trips collection started at stations that are to the west of the -74 longitude coordinate?

Longitude decreases in value as you move west.

db.trips.find({ "start station location.coordinates.0": { "$lt": -74 }}).count()

I’m getting the total count as 1929.

Hi @Ayush_singh1,

Welcome to the MongoDB Community Forums,

I think there must be some modification in your dataset. So, I will suggest you delete all the database and collection and re-load the sample dataset in your atlas cluster, so all the missing collection will be restored.

There are several ways to delete the existing dataset.

A simple one will be using the Atlas Cloud Cluster.
There is a small delete icon beside the database name, you can click it to drop the databases one by one.

Second way is by using the db.dropDatabase() method:

use <database_name>


Load sample data to your cluster



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