Get Started Free

MongoDB Filters Without the Syntax

Pick a field from your collection, choose an operator such as $eq, $gt, $lt, $in or $regex from a dropdown, and type a value into an input that adapts to the field type: date, number, string or boolean. Add more conditions, group them with AND/OR logic, and the builder writes the MongoDB filter for you.

Visual query builder interface with field selectors and operators

Advanced Query Options

Choose which fields to include or exclude in the projection builder, add sort criteria with ascending and descending toggles, and set limit and skip for paging. Every option lives in the same panel as the filter, so you never have to remember how a projection or sort document is written.

Query options panel with projection, sort, limit, and skip settings

Click or Type, Both Stay in Sync

Changes in the builder update the Query field, and edits in the Query field update the builder. Switch between clicking and typing whenever you like, run the query, and browse the results in Tree, Table or BSON view. Reading the generated JSON next to your clicks is also a quick way to learn MongoDB query syntax.

Query execution interface with results and toggle between visual and raw modes

Also a Visual Query Builder for SQL Databases

The same point-and-click approach works on PostgreSQL, MySQL, MariaDB, SQL Server, Oracle and SQLite. Pick your tables, let the builder suggest joins from your foreign keys, add WHERE conditions and sorting, and watch the generated SQL update as you click.

VisuaLeaf visual SQL query builder joining customer_orders, customers and payments tables with WHERE and ORDER BY conditions

One Builder Style, Two Kinds of Database

Here is what a few clicks produce in each builder. The SQL walkthrough follows the Visual SQL Query Builder documentation; the MongoDB example uses the filter, projection and sort fields of a collection.

SQL · PostgreSQL, MySQL, SQL Server, SQLite

Top 20 customers by total order value

  1. Open the SQL Table activity on orders and click the Query Builder toggle in the toolbar.
  2. Hover customers. The builder suggests orders.customer_id = customers.id from the foreign key; click Add JOIN.
  3. Tick customers.name and switch its Group toggle on.
  4. Tick orders.total, set its aggregate to SUM and rename it total_value.
  5. Sort total_value descending and set Limit to 20.

The live preview panel now shows:

SELECT customers.name, SUM(orders.total) AS total_value FROM orders INNER JOIN customers ON orders.customer_id = customers.id GROUP BY customers.name ORDER BY total_value DESC LIMIT 20;
MongoDB

Active adult users, newest first

  1. Open the collection and toggle the Query Builder panel.
  2. Add a condition: status, equals, active.
  3. Add a second condition: age, $gte, 18. Both conditions sit in one AND group.
  4. In the projection builder, include name and email and exclude _id.
  5. Add a sort on createdAt, descending.

The query fields now hold:

Query: { status: "active", age: { $gte: 18 } } Projection: { name: 1, email: 1, _id: 0 } Sort: { createdAt: -1 }

To group and total documents the way the SQL example does, continue in the aggregation pipeline builder.

What the SQL Builder Covers

The Visual SQL Query Builder writes SELECT statements. It lives as a side panel in the SQL Table activity, so it always runs against a specific base table, and it keeps its filters, joins and aggregates when you close and reopen the panel.

Filters and joins

Each filter is a column, an operator and a value input that adapts to the column type. Operators include =, !=, >, <, >=, <=, BETWEEN, IN, LIKE, IS NULL and IS NOT NULL.

Filters combine with AND by default. Click the AND chip to switch to OR, or drag one filter onto another to group them. Joins can be INNER, LEFT, RIGHT or FULL OUTER, with more than one condition per join, and removing a joined table cleans up every reference to it.

Aggregates, sorting and limits

Wrap any output column in COUNT, COUNT(DISTINCT), SUM, AVG, MIN or MAX, and give it an alias. Columns with the Group toggle on go into GROUP BY automatically, and + Having adds a filter that applies after aggregation.

Set sort direction per column, drag rows in the Sort panel to reorder them, and cap the row count with Limit. The live SQL preview highlights the clause produced by your last click, so you can see exactly what each control does.

How it works

  1. Connect. Add a MongoDB, PostgreSQL, MySQL, MariaDB, SQL Server, Oracle or SQLite connection in the Connection Manager.
  2. Open a table or collection. For SQL, open the SQL Table activity and click Query Builder in the toolbar; the panel opens on the right and you can resize it by dragging its edge. For MongoDB, open the collection and toggle the Query Builder panel.
  3. Build. Pick columns or fields, operators and values. The generated SQL or MongoDB query updates on every change.
  4. Run. Run Query executes against the table and refreshes the grid. MongoDB results open in Tree, Table or BSON view.
  5. Keep it. Save the query to the query library and parameterize filter values for reuse, or move the SQL into the SQL Editor to keep refining it.

See It on Your Database

Each database page shows how VisuaLeaf works with that engine. The documentation covers every builder control in detail.

Frequently Asked Questions

Which databases does the visual query builder work with?
VisuaLeaf has two builders. The Visual SQL Query Builder works on relational connections such as PostgreSQL, MySQL, MariaDB, SQL Server, Oracle and SQLite, and writes SELECT statements. The MongoDB query builder writes find filters, projections and sort orders for MongoDB collections.
How does the builder decide how to join two tables?
It reads foreign-key metadata from the database's information schema. When you hover a table that is related to one already in the query, it suggests the join condition, for example orders.customer_id = customers.id. You can accept it, edit it, add more conditions, and choose INNER, LEFT, RIGHT or FULL OUTER. If your schema has no declared foreign keys, you can add relationship hints in the connection settings.
Can I see and edit the SQL it generates?
Yes. A live preview panel shows the generated SQL on every change. Copy it from the preview, or use Import Query Builder SQL in the SQL Table activity to move it into that activity's SQL editor and edit it by hand.
Does the visual builder handle CTEs and window functions?
No. The builder covers selected columns, filters, joins, aggregates, GROUP BY, HAVING, ORDER BY and LIMIT. For CTEs, window functions or other constructs it does not expose, copy the generated SQL into the SQL Editor and finish the query there.
Can I switch between the MongoDB builder and typing the query myself?
Yes. The MongoDB builder and the Query field stay in sync in both directions, so a change in one appears in the other. For grouping and multi-stage transformations, use the aggregation pipeline builder.
View all FAQs
Aggregation pipeline builder with stage palette

Aggregation Pipeline

Take your Query Builder results further with the Aggregation Pipeline. After filtering documents with the visual query builder, seamlessly transform, group, and analyze your data using 37+ aggregation stages. Build complex data pipelines that start where your queries end.

VisuaLeaf MongoDB GUI - Charts & Dashboards for creating custom MongoDB data visualizations

Charts & Dashboards

Visualize your Query Builder results instantly with Charts & Dashboards. Turn filtered data into bar charts, line graphs, and pie charts with one click. Create live dashboards that update as your query results change, perfect for monitoring and reporting.

Want to Learn More?

Check out the documentation to explore all the details about the Query Builder and discover more VisuaLeaf features.

Read the Documentation

Ready to query your MongoDB and SQL databases visually?

Get started free with our Community Edition. Includes a 14-day trial of Pro features.

macOS Windows Linux