Skip to content
Studio 3T - The professional GUI, IDE and client for MongoDB
  • Tools
    • Aggregation Editor
    • IntelliShell
    • Visual Query Builder
    • Export Wizard
    • Import Wizard
    • Query Code
    • SQL Query
    • Connect
    • Schema Explorer
    • Compare
    • SQL ⇔ MongoDB Migration
    • Data Masking
    • Task Scheduler
    • Reschema
    • More Tools and Features
  • Solutions
  • Resources
    • Knowledge Base
    • MongoDB Tutorials & Courses
    • Tool/Feature Documentation
    • Reports
    • Case Studies
    • Whitepapers
    • Blog
    • Testimonials
    • Community
  • Contact us
    • Contact
    • Sales Support
    • Feedback and Support
    • Career
    • About Us
  • Store
    • Buy Now
    • Preferred Resellers
    • Team Pricing
  • My License
  • Download
search

Studio 3T Knowledge Base

  • Documentation
  • Tutorials
  • Workshops
Take the fastest route to learning MongoDB. Cover the basics in two hours with MongoDB 101, no registration required.
Start the free course

How to Query MongoDB

Posted on: 01/10/2018 (last updated: 09/03/2022) by Dakota Karlsson

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 SQL
  • the mongo Shell
  • through the Aggregation Editor
  • and lastly, the Visual Query Builder

Make use of the Visual Query Builder or write your query in SQL. Create an aggregate query in the Aggregation Editor or use the revamped IntelliShell to navigate through your data!

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

  • SQL Query
  • IntelliShell
  • Aggregation Editor
  • Visual Query Builder
  • Query Code – the application code generator built in to Studio 3T which works with all those functions

Visual Query Builder – Drag, Drop, and Query

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

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.

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.

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.

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.

Here’s the comprehensive guide to using SQL in MongoDB

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.

Here’s the full IntelliShell 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.

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


How helpful was this article?
This article was hideous
This article was bad
This article was ok
This article was good
This article was great
Thank you for your feedback!

About The Author

Dakota Karlsson

New to the world of databases, Dakota hails from a rural town in Texas and is learning just how exciting databases can be. After brief stops in the Big Sky state and a few years in Scandinavia, he now calls Berlin home and spends his spare time involved in the Berlin music scene and experiencing the art of German cuisine.

Article navigation

Related articles

  • Lesson 4, Exercise 3: Using Visual Query Builder to query data
  • Lesson 4, Exercise 2: Using Visual Query Builder to query a single array value
  • Lesson 4, Exercise 3: Using Visual Query Builder to query multiple array values
  • Lesson 5, Exercise 3: Using Visual Query Builder to query embedded documents
  • How to Query MongoDB Arrays Without Using the mongo Shell

Studio 3T

MongoDB Enterprise Certified Technology PartnerSince 2014, 3T has been helping thousands of MongoDB developers and administrators with their everyday jobs by providing the finest MongoDB tools on the market. We guarantee the best compatibility with current and legacy releases of MongoDB, continue to deliver new features with every new software release, and provide high quality support.

Find us on FacebookFind us on TwitterFind us on YouTubeFind us on LinkedIn

Education

  • Free MongoDB Tutorials
  • Connect to MongoDB
  • Connect to MongoDB Atlas
  • Import Data to MongoDB
  • Export MongoDB Data
  • Build Aggregation Queries
  • Query MongoDB with SQL
  • Migrate from SQL to MongoDB

Resources

  • Feedback and Support
  • Sales Support
  • Knowledge Base
  • FAQ
  • Reports
  • Case Studies
  • White Papers
  • Testimonials
  • Discounts

Company

  • About Us
  • Blog
  • Careers
  • Legal
  • Press
  • Privacy Policy
  • EULA

© 2022 3T Software Labs GmbH. All rights reserved.

  • Privacy Policy
  • Cookie settings
  • Impressum
When you click "Accept", you are agreeing to cookies being on your device. They may improve site navigation, site usage analysis, or the relevance of messages. It is up to you which cookies are enabled. Read our Privacy Policy.
Manage cookies
Accept
✕

Privacy Preference Center

A cookie is a small file of letters and numbers that is downloaded on to your computer when you visit a website. Cookies are used by many websites and can do a number of things, eg remembering your preferences, recording what you have put in your shopping basket, and counting the number of people looking at a website. In the form below you can choose which cookies, except for essential cookies, to allow or disable.

Accept all cookies

Manage consent preferences

Essential cookies are strictly necessary to provide an online service such as our website or a service on our website which you have requested. The website or service will not work without them.

Performance cookies allow us to collect information such as number of visits and sources of traffic. This information is used in aggregate form to help us understand how our websites are being used, allowing us to improve both our website’s performance and your experience.

Functional cookies collect information about your preferences and choices and make using the website a lot easier and more relevant. Without these cookies, some of the site functionality may not work as intended.

Social media cookies are cookies used to share user behaviour information with a third-party social media platform. They may consequently effect how social media sites present you with information in the future.

Accept selected