Visual SQL Query Builder
Paste CREATE TABLE statements, drag tables onto a canvas, tick columns, click to join, add filters and copy correct SQL for five database dialects.
Draait in je browser. Je bestanden verlaten je apparaat nooit. Zie hoe je dit controleert
…
Zo doe je het
- 1Paste your schema
In the Schema tab paste CREATE TABLE statements or open a .sql file.
- 2Add tables
In Query choose tables from + Add table; joins from foreign keys appear.
- 3Select columns
Tick columns on the cards and set aggregates and aliases in Columns.
- 4Join tables
Click ⇄ on two columns or use Suggest joins; set the join type.
- 5Filter and sort
Add filters, HAVING conditions, sorts, limit and offset.
- 6Copy the SQL
Pick a dialect, review warnings and copy or download the query.
Over deze tool
Writing joins by hand is where most SQL mistakes happen: a forgotten join condition multiplies rows, a LEFT JOIN written from the wrong side drops data, and every database spells LIMIT, quoting and case-insensitive search differently. This builder lets you assemble a query visually and read correct SQL at every step. Paste your schema as CREATE TABLE statements and the tables appear in a list; add them to the canvas, where each table card shows its columns with key markers. Tick a column to select it, click the join icon on two columns to link tables, or let the builder suggest joins from foreign keys. Aggregates, aliases, WHERE and HAVING filters with AND and OR, sorting, DISTINCT, LIMIT and OFFSET are set in lists below the canvas. The SQL panel rewrites the query for PostgreSQL, MySQL or MariaDB, SQLite, SQL Server or Oracle, with optional parameters and warnings for common traps.
Who this is for
Analysts and product managers who know their data but not every SQL detail, developers moving queries between databases, students learning joins and grouping, and support teams who need a quick report query.
Schema
The Schema tab accepts CREATE TABLE statements from pg_dump, mysqldump, SQLite .schema or SQL Server scripts, including inline REFERENCES, FOREIGN KEY constraints and ALTER TABLE foreign keys. Column types are used to quote values correctly.
Canvas and joins
Each table gets a short alias. Drag cards by their title. Tick columns to add them to SELECT. Click ⇄ on a column, then ⇄ on a column in another table to create a join; foreign keys are suggested automatically when you add a table, and Suggest joins adds any missing ones. Joins are drawn as lines, dashed for outer joins. In the joins list choose INNER, LEFT, RIGHT or FULL and swap sides. A join written from the second table is translated so its meaning stays the same.
Columns, filters and sorting
Give a column COUNT, COUNT DISTINCT, SUM, AVG, MIN or MAX and an alias; GROUP BY is added for the other columns. Filters support comparisons, contains, starts with, LIKE, IN lists, BETWEEN and IS NULL, joined with AND or OR, as WHERE or HAVING with an aggregate. Sorts can use aggregates too.
Dialects
PostgreSQL uses double quotes, ILIKE and LIMIT; MySQL backticks and LIMIT; SQLite LIKE (case-insensitive for ASCII) and LIMIT with OFFSET; SQL Server square brackets, TOP or OFFSET FETCH with ORDER BY, and N'' strings for Unicode; Oracle drops AS before table aliases and uses FETCH FIRST. Options: quote every name, use parameters ($1, ?, @p1 or :1) with the values listed, and uppercase or lowercase keywords. All dialects downloads one file with every version.
Worked example
Customers left-joined to orders, selecting c.name and COUNT(o.id) AS orders, filtered on names containing an, having more than 2 orders and sorted by the count, becomes in PostgreSQL: SELECT c.name, COUNT(o.id) AS orders FROM customers AS c LEFT JOIN orders AS o ON c.id = o.customer_id WHERE c.name ILIKE '%an%' GROUP BY c.name HAVING COUNT(o.id) > 2 ORDER BY COUNT(o.id) DESC LIMIT 10. In SQL Server the same query starts SELECT TOP 10 and uses LOWER() LIKE LOWER().
Limits
The builder creates SELECT queries; subqueries, UNION, window functions and CTEs must be added by hand after copying. It does not connect to a database or check the data, so test the query on a copy first. Schema parsing understands common CREATE TABLE syntax but may miss vendor-specific options.
Uitgewerkt voorbeeld
customers LEFT JOIN orders, COUNT(o.id) AS orders, name contains "an", HAVING COUNT > 2 → PostgreSQL uses ILIKE and LIMIT 10; SQL Server uses TOP 10.
In het kort
- Categorie: Ontwikkelaar & data
- Draait in je browser, geen registratie, geen upload.
- De gegevens die je invoert blijven op je apparaat.
- Beschikbaar in het Engels.
- Inhoud voor het laatst gecontroleerd:
- Officiële bron: PostgreSQL SELECT reference and the SQL dialects of MySQL, SQLite, SQL Server and Oracle
Veelgestelde vragen
Does it connect to my database?
No. It works from the schema text you paste and only produces SQL; nothing is sent anywhere.
How do I get my schema?
Use pg_dump --schema-only, mysqldump --no-data, the .schema command in SQLite, or Script Table As in SQL Server Management Studio.
Why did my LEFT JOIN become a RIGHT JOIN?
When a join is written from the other table, the builder swaps LEFT and RIGHT so the same rows are kept.
Can I use parameters instead of values?
Yes. Tick Parameters to get placeholders for your dialect and a list of values in order.
Does MySQL support FULL OUTER JOIN?
No. The builder warns you; combine a LEFT JOIN and a RIGHT JOIN with UNION instead.
Is my work saved?
Yes, the schema and query are kept in local storage with undo, and Save file stores them as JSON.
