Convert MySQL query into MongoDB

Welcome to the community @Pradeep_Maurya!

Rather than directly translating your MySQL schema and queries into MongoDB, I would encourage you to consider the best data model to suit your use case. As @Doug_Duncan mentioned, there are other options in MongoDB (such as embedding) which may offer better performance and less complex queries for common use cases.

Some helpful starting points for learning more about data modelling in MongoDB are:

If you do have a question about querying in MongoDB, please provide more information to help others understand what you are trying to achieve: version of MongoDB server, example documents, desired outcome, and what you have tried.

Regards,
Stennie

2 Likes