SQL Query Builder
Select columns, connect tables, create conditions and export readable SQL. Your schema and work stay in this browser. Back up important queries as JSON files.
Select columns
Choose what the query returns and optionally summarize values.
Join tables
Connect related data using explicit column pairs.
Filter rows
Only include records that match your conditions.
Group & summarize
Aggregate results and filter groups with HAVING.
Group by
Having
Sort & limit
Order output rows and cap the result set.
Edit your schema
Define table and column names exactly as they exist in your database.
Schema JSON format: {"tables":[{"id":"users","name":"users","columns":[{"id":"id","name":"id","type":"integer"}]}]}. IDs are internal stable keys; table and column names become quoted SQL identifiers. Editing a referenced name updates generated SQL.
A query without typing SQL.
Start with a base table, pick columns on the left, and join related tables when you need columns from elsewhere. Add filters, grouping and ordering, then review the SQL preview on the right.
- Design the schema. Use the demo or import definitions from your own database.
- Select output columns. COUNT, SUM, AVG, MIN and MAX are supported for appropriate types.
- Connect tables. Set each join's left/right keys; a joined table is added only once.
- Add conditions. Values are represented as parameters by default.
- Generate & export. Copy SQL and bindings or download a project backup.
Security and limitations
Generated SQL is a SELECT statement only. This tool does not connect to a database, inspect credentials or execute SQL. Parameter placeholders must be bound in your application's database driver; never concatenate untrusted user input into executable SQL. This builder supports up to three WHERE condition groups with AND/OR connectors, but does not support arbitrary-depth nesting, subqueries, CTEs, window functions, arbitrary expressions, or self-joins.
Untrusted project and schema JSON is validated, never evaluated as JavaScript. This editor stores autosaved draft data in your browser; export a JSON backup before clearing site data.