Question
1 .Use the movieDetails collection, calculate the highest, lowest, and average imdb.rating of all films in the that won at least 1 award and had
1.Use the movieDetails collection, calculate the highest, lowest, and average imdb.rating of all films in the that won at least 1 award and had more than 2 nominations.
For the first question,can you help me write the mongodb query. The queries have to be written individually for highest, lowest and average. I have assignment due tom.
2.Use the solarSystem collection, calculate the average mass and number of moons for each type of planet.
The one document pattern is given like this. There are nine such documents like the pattern given below.
{"_id":{"$oid":"59a06674c8df9f3cd2ee7d51"},"name":"Sun","type":"Star","orderFromSun":{"$numberInt":"0"},"radius":{"value":{"$numberInt":"695700"},"units":"km"},"mass":{"value":{"$numberDouble":"1.9885e+30"},"units":"kg"},"sma":{"value":{"$numberInt":"0"},"units":"km"},"orbitalPeriod":{"value":{"$numberInt":"0"},"units":"years"},"eccentricity":{"$numberInt":"0"},"meanOrbitalVelocity":{"value":{"$numberInt":"0"},"units":"km/sec"},"rotationPeriod":{"value":{"$numberDouble":"25.449"},"units":"days"},"inclinationOfAxis":{"value":{"$numberDouble":"7.25"},"units":"degrees"},"meanTemperature":{"$numberInt":"5600"},"gravity":{"value":{"$numberInt":"274"},"units":"m/s^2"},"escapeVelocity":{"value":{"$numberDouble":"617.7"},"units":"km/sec"},"meanDensity":{"$numberDouble":"1.4"},"atmosphericComposition":"H2+He","numberOfMoons":{"$numberInt":"0"},"hasRings":false,"hasMagneticField":true}
For the above question can you please help me write a mongodb query. I have assignment due tom.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started