Queries Using Aggregate Functions In Mongodb