Challenge

Project 2

QUESTIONS:
Answer_1:


db.products.aggregate([{$group:{_id:'product_cost',

avg:{$avg:'$product_cost'}}}])

Answer_2:


db.customers.aggregate([{$sort: {purchase_amount:-1}])

Answer_3:


db.order.aggregate([{$group:{_id:'Total_cost', sum:

{$sum:'$product_cost'}}}])

Answer_4:


db.customers.aggregate([{$group:{_id:'customer_city',

$match:{customer_city}}}])

Answer_5:

db.sellers.aggregate([$group:{_id:'seller_name',

$match: {customer_city}}}])

db.orders.aggregate([$sort :{order: 1}, $match:

{customer_city}}}]

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.