Visual SQL Query Builder
The Visual SQL Query Builder is a point-and-click surface for assembling SELECT statements without touching a keyboard. Pick columns, add filters from dropdowns, choose join types, and watch the generated SQL update live in the preview panel. When you're happy, hit Run Query to execute against the current table, or copy the SQL and paste it into the SQL Editor for further work.
The builder is not a standalone activity — it lives as a side panel inside the SQL Table activity, so it always operates against a specific base table. Open the SQL Table activity for the table you want to query, then click the Query Builder toggle in the toolbar. The panel opens on the right and you can resize it by dragging its left edge.
Toggling the panel off keeps its state on the activity — reopen it later and your filters, joins, and aggregates are still there.
The Columns pane lists every column of the base table, plus columns of any joined tables. Each row exposes:
SELECT list.AS alias.COUNT, SUM, AVG, MIN, or MAX.GROUP BY.ORDER BY ASC / DESC.Click + Filter to open a filter row. Each filter has three parts:
| Operator | Meaning | Value input |
|---|---|---|
=, != | Equality / inequality | Single value |
>, <, >=, <= | Numeric / date comparisons | Single value |
BETWEEN | Range (inclusive) | Two values |
IN | Value in a list | Comma-separated list |
LIKE | Pattern match | Pattern with % / _ |
IS NULL, IS NOT NULL | Presence check | None |
Filters are combined with AND by default. Click the AND chip to toggle to OR, or group filters by dragging one onto another.
VisuaLeaf reads foreign-key metadata from the information schema. When you hover a table that is related to a table already in the query, a suggested JOIN condition appears:
Example: with orders as the base table, hovering customers shows orders.customer_id = customers.id. Click Add JOIN to accept, or edit the condition manually.
INNER, LEFT, RIGHT, or FULL OUTER from the join dropdown.Wrap any output column with an aggregate function from its dropdown:
COUNT, COUNT(DISTINCT)SUM, AVGMIN, MAXAny non-aggregated column with the Group toggle on is added to the GROUP BY clause automatically. Add a HAVING filter using the + Having button — it works exactly like a filter but applies after aggregation.
Set sort order per column using the up/down arrows in the columns pane; drag rows in the Sort panel to reorder. The Limit field caps the row count; a checkbox toggles LIMIT on or off entirely.
A collapsible panel at the bottom of the builder shows the generated SQL as you edit. It updates on every change and highlights the fragment corresponding to the pane you last touched, so you can see exactly which clause your click produced.
Two flows depending on where you want to keep working:
orders.customers on orders.customer_id = customers.id.customers.name. In its aggregate dropdown, leave it as-is; toggle Group on.orders.total. Set aggregate to SUM. Rename to total_value.total_value descending.LIMIT to 20.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;
Download and start managing your MongoDB databases with ease.
Download Free Trial