Question: 1 . Write an aggregate statement to sort the documents in the grades collecion based on students ID and class ID . Display only the
Write an aggregate statement to sort the documents in the grades collecion based on students ID and class ID Display only the student ID and the class ID for each document. Sort the result from high to low values for student ID and from low to high for class ID
Revise the previous query to show the result for students with IDs between and
Show only existing class IDs in the grades collection. Do not show duplicates.
Write a query to display student ID and class ID for students whose score are greater than Sort the result based on student ID from high to low and class ID from low to high.
Write a query to show the maximum and the minimum class ID for each student. Sort the result based on student ID from low to high. Show only the first students.
See the following sample output:
id : "maxclassid : "minclassid :
id : "maxclassid : "minclassid :
id : "maxclassid : "minclassid :
id : "maxclassid : "minclassid :
id : "maxclassid : "minclassid :
id : "maxclassid : "minclassid :
id : "maxclassid : "minclassid :
id : "maxclassid : "minclassid :
id : "maxclassid : "minclassid :
id : "maxclassid : "minclassid :
Write a query to find the number of failed exams for student with ID
Good luck.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
