If you're looking for MongoDB Interview Questions for Experienced or Freshers, you are at right place. There are lot of opportunities from many reputed companies in the world. According to research MongoDB has a market share of about 4.5%. So, You still have opportunity to move ahead in your career in MongoDB Development. Mindmajix offers Advanced MongoDB Interview Questions 2018 that helps you in cracking your interview & acquire dream career as MongoDB Developer. Q. What’s a good way to get a list of all unique tags? What’s the best way to keep track of unique tags for a collection of documents millions of items large? The normal way of doing tagging seems to be indexing multikeys. I will frequently need to get all the unique keys, though. I don’t have access to mongodb’s new “distinct” command, either, since my driver, erlmongo, doesn’t seem to implement it, yet. Even if your driver doesn’t implement distinct, you can implement it yourself. In JavaScript (sorry, I don’t know Erlang, but it should translate pretty directly) can say: result = db.$cmd.findOne({“distinct” : “collection_name”, “key” : “tags”}) So, that is: you do a findOne on the “$cmd” collection of whatever database you’re using. Pass it the collection name and the key you want to run distinct on. If you ever need a command your driver doesn’t provide a helper for, you can look at HTTP://WWW.MONGODB.ORG/DISPLAY/DOCS/LIST+OF+DATABASE+COMMANDS for a somewhat complete list of database commands. Q. MongoDB query with an ‘or’ condition I have an embedded document that tracks group memberships. Each embedded document has an ID pointing to the group in another collection, a start date, and an optional expire date. I want to query for current members of a group. “Current” means the start time is less than the current time, and the expire time is greater than the current time OR null. This conditional query is totally blocking me up. I could do it by running two queries and merging the results, but that seems ugly and requires loading in all results at once. Or I could default the expire time to some arbitrary date in the far future, but that seems even uglier and potentially brittle. In SQL I’d just express it with “(expires >= Now()) OR (expires IS NULL)” – but I don’t know how to do that in MongoDB. Just thought I’d update in-case anyone stumbles across this page in the future. As of 1.5.3, mongodb now supports a real $ or operator: https://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24 or Your query of “(expires >= Now()) OR (expires IS NULL)” can now be rendered as: {$or: [{expires: {$gte: new Date()}}, {expires: null}]} In case anyone finds it useful, www.querymongo.com does translation between SQL and MongoDB,