JSON, JavaScript, mongoDB. NoSQL.

A map reduce that answers this question?
What is the average quantity for orders?
If an order contains

items: [{ itemNo: 1, qty: 4 }, { itemNo: 2, qty: 1} ]

the total quantity for this order is 5.

Your script calculates the average quantity and displays a single number.
You should have an average of 2.675 items per order.