Visual Query Builder
Build SELECT queries by clicking — no SQL required.
Overview
The Visual Query Builder lets you construct SELECT queries through a point-and-click interface. Choose a table, pick the columns you want, add filter conditions, configure joins with other tables, and set sort order and row limits. The generated SQL appears in a live preview pane and updates as you make changes — copy it to your clipboard or run it directly against a connected database.
No SQL Knowledge Required
The Query Builder is designed so that anyone who understands their data model can build a correct SELECT query without writing a single character of SQL. Advanced users can still edit the generated SQL directly in the preview pane.
Building a Query — Step by Step
Step 1 — Pick a Table
Click the Select Table dropdown in the left panel. Tables are listed from the schema you imported (or from the connected database). Selecting a table populates the column list below it.
Step 2 — Select Columns
Each column is shown with a checkbox. Check the columns you want in the SELECT clause. The Select All shortcut at the top checks all columns at once. Reorder selected columns by dragging them in the "Selected Columns" list on the right.
Step 3 — Add WHERE Filters
Click + Add Filter below the column list. Each filter row has three parts:
- Column — a dropdown of all columns from the selected table (and joined tables if any).
- Operator — chosen from the list appropriate for the column type (see WHERE Filters section).
- Value — a text input or date picker, depending on the column type.
Multiple filter rows are combined with AND by default. Click the AND badge to toggle it to OR for that condition.
Step 4 — Set ORDER BY and LIMIT
In the Sort & Limit panel, choose a column to sort by, select ASC or DESC, and optionally enter a LIMIT value (e.g. 100).
Step 5 — Copy or Run
The generated SQL is shown in the SQL Preview panel. Click Copy SQL to copy to clipboard, or click Run Query if a database connection is active.
WHERE Filters
The available operators depend on the column's data type.
| Column Type | Available Operators |
|---|---|
| String / Text | equals, does not equal, contains, does not contain, starts with, ends with, is null, is not null |
| Integer / Decimal | = ≠ < <= > >= between, is null, is not null |
| Date / Timestamp | equals (date), before, after, between, in last N days, is null, is not null |
| Boolean | is true, is false, is null, is not null |
| UUID | equals, is null, is not null, in list (comma-separated) |
| Enum | equals, does not equal, in list (multi-select) |
Grouped Conditions
Click Group Filters to wrap the current set of filter rows in parentheses in the generated SQL. Add another group and the two groups will be combined with OR, producing queries like WHERE (a = 1 AND b = 2) OR (c = 3).
JOINs
Click + Add JOIN in the Join panel to add a table join to the query.
- Select the join type: INNER JOIN, LEFT JOIN, RIGHT JOIN, or FULL OUTER JOIN.
- Select the target table to join.
- Select the join condition: left column, operator (usually =), right column.
- The join target table's columns are now available in the column selector and filter dropdowns.
INNER JOIN
Returns rows where the join condition is met in both tables. Most common join type for fetching related data.
LEFT JOIN
Returns all rows from the left table plus matching rows from the right. Unmatched right-side values are NULL.
FULL OUTER JOIN
Returns all rows from both tables. Unmatched values on either side are NULL. Not supported by all databases.
Generated SQL
The SQL Preview panel shows the current query in formatted SQL, updated live with every change you make in the builder. The generated SQL uses the same formatting rules as the SQL Formatter (2-space indent, UPPERCASE keywords).
You can edit the generated SQL directly in the preview pane. Manual edits are preserved as long as you do not make further changes in the builder panels (which would regenerate the SQL from the builder state).
Running Queries
If a database connection is configured (via Settings → Database Connection), you can run the query directly and see results in a table below the SQL preview.
- Results are shown in a paginated table — 50 rows per page by default.
- Columns are sortable by clicking the header.
- Export the results as CSV or JSON using the export buttons above the result table.
- Query execution time is shown in milliseconds at the top of the results panel.
SELECT Queries Only
The Visual Query Builder generates and runs SELECT queries only. INSERT, UPDATE, DELETE, and DDL statements are not supported. Use the Database Manager in Developer Tools for write operations.
AI Assistant
Open the built-in AI Assistant from the tab on the right edge of the screen to get help building your query. The assistant sees the current FROM entity, selected columns, JOINs, WHERE filters, ORDER BY clauses, LIMIT/OFFSET, and the live generated SQL, so you can ask things like:
- "Explain what the generated SQL will return"
- "How do I add a JOIN to bring in related data?"
- "Do you see any issues with the current query?"
- "How can I make this query more efficient?"
The assistant does not execute the query or see real results — it reasons over the current builder state and the generated SQL text shown on screen.