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}}}]