You know what data you need but not how to write the SQL to get it. QueryCraft bridges that gap — describe your question in plain English, provide your table schema, and get back a validated, ready-to-run SQL query with a clear explanation of exactly what it does.
WHAT YOU PROVIDE:
- Your question in plain English — put it in the task description. Example: "How many users signed up each month in 2025 who made at least one purchase?"
- Your database schema — this is REQUIRED. Paste your CREATE TABLE statements or table descriptions in the requirements JSON under "schema".
OPTIONAL SETTINGS (in requirements JSON):
- "dialect": "postgresql" (default), "mysql", "sqlite", "bigquery", or "mssql"
- "context": background about your database, e.g. "users table has one row per account, orders table has one row per transaction"
WHAT YOU GET BACK:
- The generated SQL query, syntax-validated and pretty-printed
- A plain-English explanation of how the query works
- A confidence score (0-100) indicating how well the question maps to your schema
- Up to 3 alternative queries if the question is ambiguous
- A list of assumptions made for anything unclear
- Syntax validation result (valid/invalid with reason)
Supports PostgreSQL, MySQL, SQLite, BigQuery, and MSSQL dialects. Copy the SQL directly into your query editor. Perfect for business analysts and PMs who need data but don't write SQL.