Tools / SQL Query Builder

SQL Query Builder

Build SELECT queries visually - tables, columns, joins, filters, ordering, limits - and copy the SQL.

Pick, filter, copy.

Tables

One per line as table: col1, col2, or paste CREATE TABLE statements.

From

Joins

Columns to return

Filters

Filter groups (after grouping)

Sort

SQL


  

What this query does

Describe it in plain English

What it does

What it does.

Visual table and column picking

Name your tables and columns; the SELECT and FROM clauses assemble live. Or describe the query in plain English and get a SELECT written against your schema.

Joins by matching keys

Add a second table and the likely join condition is proposed from column names; edit it inline.

Filters, order, limits

WHERE conditions, ORDER BY and LIMIT are guided fields, not syntax you recall.

Dialect-clean output

Choose Postgres/SQLite, MySQL or SQL Server: identifiers are quoted the right way and LIMIT becomes TOP where needed.

Plain English in, SQL checked

Describe the result in a sentence and the assistant drafts the SELECT, checked against the tables and columns you defined. SELECT only, by rule.

Three dialects out

Standard (Postgres and SQLite), MySQL or SQL Server. Identifiers quote and limits phrase the way the dialect expects.

Joins by matching keys

Add a join by picking two tables and the columns that match. The ON clause writes itself.

Seven comparison operators

Equals, not equals, greater, less, at-least, at-most and LIKE cover the filters real reporting needs.

Review notes under the SQL

A note appears when a column is not in your schema, a table is not in FROM or a JOIN, or a join you edited by hand is kept as typed.

Order and limit, spelled out

Type the ORDER BY and a numeric LIMIT, so the top-10 report is a form, not a query.

Copy-clean output

The SQL renders formatted and copies in one click, ready for your console or migration file.

Honest assistant errors

If the plain-English draft names columns you never defined, a note lists them instead of passing them silently.

How it works

How to use it.

Step 1

Define tables and the columns you want back.

Step 2

Add joins and filters with the guided controls.

Step 3

Copy the SQL into your client or migration.

Step 4

Define your tables and the columns each one has.

Step 5

Tick the columns to return and add joins by their matching keys.

Step 6

Add filters, ordering and a limit.

Step 7

Pick a dialect, then write the SQL or ask the assistant from plain English, and copy it.

FAQ

Which dialects?

Standard SQL output that runs on Postgres, MySQL, SQLite and SQL Server with at most identifier-quote tweaks.

INSERT/UPDATE?

The builder focuses on SELECT, the query people reach for help with. Write-side statements are not covered.

Is my schema uploaded?

No. Everything assembles in your browser tab.

Can it UPDATE or DELETE?

No. The builder and the assistant produce SELECT queries only. Reading data is the job; changing it stays in your hands.

Which dialects are supported?

Standard SQL as Postgres and SQLite read it, plus MySQL and SQL Server variants for quoting and row limits.

Does it connect to my database?

No. It never sees your data. You describe the schema by typing table and column names, and the SQL builds locally.

What does the AI assistant do exactly?

It turns one plain-English sentence into a SELECT using only your defined tables and columns, one request per press, and it is checked before shown.

What does it warn about?

Columns missing from your schema, tables not in FROM or a JOIN, and join conditions you edited by hand. The SQL still shows, so read the note before you run it.

What if my filter needs OR?

Filters combine with AND in the builder. For OR logic, copy the SQL and adjust the WHERE clause by hand.

Is my schema uploaded?

The visual builder is fully local. Only when you press the assistant button does your schema text go in one request; nothing is stored.

Do I need to know SQL?

No. You pick tables, columns and conditions; the query writes itself in standard SQL.

Does it run the query?

No. It builds the statement for you to copy into your own database client.

Worked example

Real output, from the tool itself.

This is what SQL Query Builder returned for its built-in example input, captured from the tool itself.

You enter

Input

users: id, name, email, created_at
orders: id, user_id, total, status

From

users

Input

orders

Input

orders.user_id = users.id

Input

orders.status

Input

=

Input

'shipped'

Order by

orders.created_at DESC

Limit

100

The tool returns

SELECT
  users.name,
  orders.total
FROM users
JOIN orders ON orders.user_id = users.id;

SQL Query Builder

See it at work

Build SELECT queries visually - tables, columns, joins, filters, ordering, limits - and copy clean SQL.

SQL Query Builder
Fields
API
CLI
schema
from
distinct
columns
joins
hiringsai tool sql-query-builder
schema string
from string
distinct boolean
columns array
12 fields, 1 required
curl -X POST https://hiringsai.com/api/v1/tools/sql-query-builder/run
-d '{"input": {"schema": "<text>"}}'
JSON result
hiringsai run sql-query-builder --input '{"schema": "<text>"}'
also callable over MCP
JSON result printed
Free toolAPI and MCPNo account
Fields
schemastring
fromstring
distinctboolean
columnsarray
Ways to use it
pagethis app
APIPOST .../run
CLIhiringsai run
MCPtools/call
API call
POST /api/v1/tools/sql-query-builder/run
input: {"schema": "<text>"}
JSON result back
Command line
hiringsai run sql-query-builder
--input <json>
JSON result printed
The SQL Query Builder page as it opens
SQL Query Builder12 fields
The page as it opens, captured from the live site.
The SQL Query Builder app at phone width
SQL Query Builderphone layout
The same app at phone width.
A woman working at a desktop monitor
SQL Query BuilderFree tool
Build SELECT queries visually - tables, columns, joins, filters, ordering, limits - and copy clean SQL.
A laptop on a wooden desk with a person typing
SQL Query BuilderAPI and MCP
Call it from a script over the API or MCP.