Challenge

Project 2

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

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

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

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

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

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

                                    $match:{customer_city}}}])

A5.

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.