SQL Query Builder

Visually build SQL queries without writing code

Database Schema

SELECT

What do you want to see?

Select columns from the left panel...

FROM & JOIN

FROM

WHERE

GROUP BY & HAVING

ORDER, LIMIT & OFFSET

Query Preview

                    
Generated automatically based on your selections

Recent SQL Builder Queries

Stored only in this browser.

Build SQL queries visually

This visual query builder writes a SELECT statement while you choose options. Select columns from your tables, add aliases and aggregates such as COUNT, SUM, AVG, MIN and MAX, then watch the query preview update. It is useful for drafting reports, learning SQL clause order and avoiding syntax mistakes.

How to use the query builder

Choose the main table, tick the columns you need, and add joins with their ON condition. Add WHERE filters with operators including =, LIKE, IN, BETWEEN and IS NULL. Finish with GROUP BY, HAVING, ORDER BY, LIMIT and OFFSET, then copy the result.

Use your own database schema

Select Edit next to Database Schema and enter a JSON object whose keys are table names and whose values are arrays of column names, for example {"users": ["id", "email"], "orders": ["id", "user_id", "total"]}. The schema is saved in your browser. The builder does not connect to a database or run queries.

Check before you run it

The output uses common SQL syntax. LIMIT and OFFSET work in MySQL, PostgreSQL and SQLite, while SQL Server uses different paging syntax. Review quoting and conditions before running a query, and use parameterized queries in application code.

Frequently asked questions

Is this SQL query builder free?

Yes. It is free to use and needs no account.

Does it work with MySQL and PostgreSQL?

It produces common SELECT syntax that suits MySQL, PostgreSQL and SQLite for typical queries. Check database-specific features yourself.

Does it connect to my database?

No. You describe table and column names, and the query is built in your browser.

Can it write INSERT or UPDATE statements?

No. It builds SELECT queries.

Related tools