Open henryliangt opened 2 years ago
Query by Aggregate:
Query by aggregate
aaa
db.getCollection("coords").aggregate( [ { $lookup: { from: 'users', localField:'city_id', foreignField: 'city_id', as: "city_ids" } }, { $match: { "$expr": {"$gt":["$latitude", 0]} }, },
]
);
3 collections in 1 database. climates, users, coords,
data source from climates.json climates.zip