SQL Query Generator
Describe the data you want, optionally paste your table schema, and pick PostgreSQL, MySQL, SQL Server, SQLite or Oracle. The AI writes a readable query, explains it and lists any assumptions. Queries are never run by us.
Uses a third-party AI providerYour request and schema are sent through our server to an AI provider to write the query. They are not stored. The query is never run.
How to use SQL Query Generator
- Describe the query. Write what the query should return.
- Add your schema. Optionally paste CREATE TABLE statements so the right names are used.
- Generate. Pick your dialect, click Generate SQL and copy the query.
Example
Top customers by order value, with the schema given.
Request
Total order value per customer in 2025, highest first, top 10
Schema
customers (id, name); orders (id, customer_id, total, created_at)
Options: PostgreSQL
Typical answer
SELECT c.id, c.name, SUM(o.total) AS total_value FROM customers c JOIN orders o ON o.customer_id = c.id WHERE o.created_at >= '2025-01-01' AND o.created_at < '2026-01-01' GROUP BY c.id, c.name ORDER BY total_value DESC LIMIT 10;
AI answers vary from run to run; this shows a typical result.
Formats, limits and privacy
- Input
- Plain text
- Output
- application/sql
- Limits
- Request up to 2,000 characters; schema up to 8,000 characters. Queries are never run by us.
- A daily number of AI requests per visitor, shared by all AI tools, plus an overall daily budget for the site.
- Needs our server and an AI provider. AI answers can be wrong, so check them before you rely on them.
- Privacy
- Your input is sent to a third-party AI provider to generate the result.
Troubleshooting
The query uses tables or columns you don't have
Paste your schema (CREATE TABLE statements) so the AI uses your real names, and check the listed assumptions.
"You have reached today's limit for AI tools"
The daily AI allowance is used up. The message says when it resets; browser-based tools keep working meanwhile.
"The AI gave an answer in the wrong format"
The model's reply could not be read. Click the button again; it usually works on the second try.
Frequently asked questions
Will it change my data?
It writes read-only SELECT queries unless you clearly ask for something else, and it never connects to your database. Always test a query on a copy first.
What happens to my text?
It is sent through our server to an AI provider to produce the answer, then discarded. We do not store it or use it for training.
Which AI does it use?
A provider such as OpenAI, with Anthropic as a backup, chosen by us. Your text is processed to write the answer and is not stored by us.
Is it free?
Yes. Each visitor gets a number of AI requests per day, shared across all AI tools, so the service stays free.