Challenge

Project 2

2.1 db.orders.aggregate([{$group:{_id:"$id",maxTotal:{$max:{$multiply: [ "$price","$items"]}},maxQuantity:{$max : "$items"}}}])

2.2 db.orders.find({},{customer_id:1}).sort({price:-1}).limit(1)

2.3 db.orders.aggregate([{$group :{_id:0,sum:{$sum:"$price"}}}])

2.4 db.Customers.aggregate([{$group :{_id:"$city","count":{$sum:1}}},{$sort:{_id:1}}])

2.5 db.products.aggregate([{$group :{_id:"$tags","count":{$sum:1}}},{$sort:{_id:1}}])

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.