Knowledge base · Studio 3T Desktop IDE

How to Query MongoDB

By Dakota Karlsson · Updated

Whether you’re a seasoned professional or a rough-around the edges rookie, querying in MongoDB has never been easier. Studio 3T offers the following ways to query MongoDB:

  • via the mongo shell with IntelliShell
  • the Visual Query Builder
  • through the Aggregation Editor
  • via SQL with SQL Query
  • and lastly, the AI Helper

Check out these guides for specific query functions in Studio 3T:

IntelliShell – The Responsive mongo Shell

For those accustomed to working in the mongo shell, Studio 3T offers IntelliShell – a mongo shell with auto-completion of JavaScript functions, command helpers, and much, much more.

Watch the video on Vimeo

AI Helper, Studio 3T’s AI-powered assistant, is built into IntelliShell where you can write queries in natural language and Studio 3T will build the mongo shell commands for you.

Here’s the full IntelliShell documentation.

Visual Query Builder – Drag, Drop, and Query

The Visual Query Builder is the easiest way to begin querying.

Watch the video on Vimeo

If you’re new to MongoDB, use the Visual Query Builder to drag and drop fields, so you can run your very first query even without knowing MongoDB query syntax. Or you can try AI Helper, Studio 3T’s AI-powered assistant, where you can type queries in natural language and Studio 3T will build the query for you.

And even if you’re an experienced MongoDB user, you can still use the Visual Query Builder to query arrays or build more complex queries.

View the full Visual Query Builder documentation.

Aggregation Editor – The MongoDB Aggregation Query Builder

Instead of writing complex aggregation queries in the mongo shell, the Aggregation Editor lets you build them one stage at a time for easier debugging. The Aggregation Editor also features built-in natural language querying with AI Helper, Studio 3T’s AI-powered assistant.

Watch the video on Vimeo

Want to start creating your first aggregation query? Here’s a tutorial that uses real-life data from the city of Chicago.

SQL Query – The Familiarity of SQL in MongoDB

If you’re a SQL expert transitioning to MongoDB, you’ll feel right at home with the SQL Query feature where you can write your query in SQL.

Write the same familiar SQL inner and left joins and expressions like SELECT, SELECT DISTINCT, ORDER BY, GROUP BY – and much more – to query MongoDB.

Watch the video on Vimeo

Here’s the comprehensive guide to using SQL in MongoDB

AI Helper – Natural Language Querying

If you’re new to MongoDB and want to try out some AI-powered querying, use AI Helper where you can type queries in natural language and Studio 3T will build find or aggregation queries for you.

Watch the video on Vimeo

Watch the video on Vimeo

With your consent, we and third-party providers use cookies and similar technologies on our website to analyse your use of our site for market research or advertising purposes, including personalized advertising (“performance”), to provide you with additional functions (“functional”), and to show content from social media platforms, such as embedded videos (“social media”). This may result in the creation of pseudonymous usage profiles and the transfer of personal data to third countries, including the USA, which may have no adequate level of protection for the processing of personal data. Please choose for which purposes you wish to give us your consent and store your preferences by clicking on “Accept selected”. You can find further information in section 9 of our Privacy Policy.

Manage consent preferences