OnSumo Tools

Visual SQL Query Builder

This tool lets you build SQL queries through a visual interface directly in your browser. Select tables, pick columns, add joins, set filters, and choose sort orders without writing SQL by hand. The tool generates the corresponding SQL statement in real time. No data is sent to a server. Your schema details, table names, and query logic stay on your device. The tool is free, requires no account, and works offline after the page loads.

100% client-side. Query draft stays in your browser (ons-sql-builder-inputs).

This tool builds syntactically correct read queries but does not execute them. Test against your actual database.

Tables

SELECT columns

WHERE filters

Combine with

No filters yet.

JOINs

No joins yet.

ORDER BY

    SQL output

    SELECT
       * 
    FROM  `users`

    How this tool works

    The SQL query builder creates SELECT queries from the fields you fill in on the page. Add one or more tables, choose whether to keep SELECT * or pick specific columns, then layer on WHERE filters, JOIN conditions, ORDER BY rules, and an optional LIMIT. The builder quotes identifiers for the selected dialect, formats string values, and regenerates the SQL every time you change an input. This makes it useful for drafting beginner-friendly read queries without memorizing syntax. The current version does not execute SQL, validate your schema against a live database, or generate INSERT, UPDATE, DELETE, GROUP BY, window functions, or CTEs. For those cases, copy the generated query into your database client and extend it manually.

    Worked example

    Start with users as the base table and orders as a joined table. Select users.name, users.email, and orders.total. Add a LEFT JOIN on users.id = orders.user_id, then filter for users.status = 'active' and orders.total >= 100. Finish with ORDER BY orders.created_at DESC and LIMIT 25. The tool outputs a clean SELECT statement you can paste into PostgreSQL, MySQL, SQLite, or BigQuery with only small dialect-specific edits if your warehouse naming rules differ.

    Structured SQL examples

    Basic SELECT

    Use this pattern when you want a short customer list from one table.

    SELECT `users`.`name`, `users`.`email`
    FROM `users`
    LIMIT 10

    JOIN query

    Use a join when the columns you need live across two related tables.

    SELECT `users`.`name`, `orders`.`total`
    FROM `users`
    LEFT JOIN `orders` ON users.id = orders.user_id
    ORDER BY `orders`.`created_at` DESC

    WHERE filter

    Filters narrow the result set before you copy the SQL into your database client.

    SELECT *
    FROM `users`
    WHERE `users`.`status` = 'active' AND `users`.`age` >= 25

    Frequently asked questions

    • Is my query or schema sent to a server?

      No. The query builder runs entirely in your browser. The table names you type and the SQL it generates stay in local browser storage unless you copy them somewhere else yourself.

    • Does it execute the query against my database?

      No. The tool generates SQL text only. It does not connect to any database. To run the query, copy the SQL output and paste it into your database client such as pgAdmin, DBeaver, DataGrip, MySQL Workbench, or the BigQuery editor.

    • Which SQL dialects does it support?

      The builder supports MySQL, PostgreSQL, SQLite, and BigQuery. It adjusts identifier quoting for each dialect so the generated SQL is closer to what those systems expect.

    • How do I write SQL queries for beginners?

      Start with one table and a simple SELECT query. Pick the table in FROM, choose the columns you want, then add one filter at a time in the WHERE section. After that, sort the results with ORDER BY and use LIMIT so the first query stays easy to inspect.

    • Can it build JOIN queries?

      Yes. Add a second table, choose the join type, then enter the ON condition such as users.id = orders.user_id. The builder will place that JOIN under the FROM clause in the final query.

    • Can it build INSERT, UPDATE, or DELETE statements?

      No. This version is focused on SELECT queries with filters, joins, sorting, and limits. If you need write queries, start with a SELECT draft here and then adapt the SQL manually in your database editor.

    • Does it support GROUP BY, CTEs, or window functions?

      Not in the visual UI. You can still copy the generated SQL and extend it manually with GROUP BY, WITH clauses, ROW_NUMBER, or other advanced syntax in your own editor.

    • Will this validate that my table or column names are real?

      No. The tool helps you assemble valid SQL structure, but it cannot confirm whether your database actually contains the tables, columns, or relationships you entered. Run the query against your real database to validate it.

    Related tools