How to perform queries in MongoDB?