db.Orders.insertMany([{custid:"A123",amount:3000,status:"A"},{custid:"A123",amount:600,status:"A"},{custid:"A123",amount:7000,status:"A"}]);
db.Orders.mapReduce(function(){emit(this.custid,this.amount);},function(custid,amt){return Array.sum(amt)},{query:{status:"A"},out:"total_Orders"})
db.total_Orders.find()
db.marks_info.insertMany([{student_name:"john doe",subject:"english",marks:78},{student_name:"john doe",subject:"maths",marks:80},{student_name:"john doe"}])
use student_data
db.marks_info.mapReduce(function(){emit(this.student_name,this.marks);},function(s_name,marks){return Array.avg(marks)},{out:"score"});
db.score.find();

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: