Challenge

Project 2

1) 

db.sales.aggregate(
[
{
$group:
{
_id: "$item",
avgAmount: { $avg: { $multiply: [ "$price", "$quantity" ] } },
avgQuantity: { $avg: "$quantity" }
}
}
]
)

 3) db.order.find({$order: = "month" });

4) 

  1. db.peaks.find(
  2. {" Location " : [ "India" : " Mumbai"]}
  3. [ "America" : "Mexico"]}
  4. [ " Russia" : " Roose" ]}
  1. Query your database to get all the sellers who have base in the same city in which the customers who ordered their products. Order them in the order of highest number of products sold to customers in same city to lowest.

5) db. customerAddresses.insertOne({customerid: " 12313", address: { city: "Nashik", pincode: "147852"}});

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.