The Visual Query Builder lets you construct SQL SELECT queries using only the mouse — no SQL knowledge required. It opens inside the diagram, is saved to the model file, and can be reopened from the Editors menu.
There are three ways to open the Query Builder:
Once the first table is loaded, expand the query to related tables using foreign keys or virtual foreign keys. Click the small arrow icon next to a column to follow a foreign key and add the related table.
Click the join type label on the connecting line to switch between INNER JOIN, LEFT JOIN, and EXISTS.
Virtual foreign keys can be created in the diagram by dragging one column onto another — they are saved to the model file and work exactly like real foreign keys in the Query Builder.
Tick the checkbox next to each column you want to include in the SELECT list. Unticked columns are excluded from the generated query.
Right-click any column and choose Filter to add a WHERE condition on that column. You can set the comparison operator and value directly in the filter dialog.
Enable Group By mode using the toggle button in the Query Builder toolbar. In this mode:
GROUP BY columnsMIN, MAX, SUM, AVG, or COUNTThe generated SQL is updated live as you make changes and is visible at the bottom of the builder.
Click the Save button in the result pane to export the full result set to a file. The query is re-executed and all rows are written to disk — useful for large result sets that do not fit on screen.
To remove a Query Builder, right-click it in the structure tree under Diagrams and choose Drop. When you close a builder, DbSchema asks whether to keep it in the design model for later use or drop it permanently.