Text to SQL

From a question to SQL you understand.

Text to SQL translates a natural-language request into a database query. TTSQL grounds that translation in your tables, relationships, and project knowledge so you have a concrete draft to inspect.

Start with a count
example
prompt

How many paid orders were placed in August 2026?

generated SQL PostgreSQL
1SELECT COUNT(*) AS paid_orders2FROM orders3WHERE status = 'paid'4  AND ordered_at >= DATE '2026-08-01'5  AND ordered_at < DATE '2026-09-01';

How text to SQL works

A SQL query describes exactly which rows, columns, joins, and calculations a database should use. A question such as ‘Who spent the most last month?’ leaves several of those choices open. A text to SQL tool combines your request with a schema to produce a candidate query.

In TTSQL, a project holds the database connection, schema, rules, and Knowledge entries. Ask a question in its workspace, resolve a clarification when needed, then inspect the SQL. Execution is an explicit action. A successful answer thread can retain the result snapshot, evidence, and follow-up questions.

Try it with a small, familiar question

Start with a database and metric you can independently check. Your first goal is to confirm that the generated query means what you intended, not to delegate every reporting decision at once.

  • Create a project and configure a database connection using credentials with only the access you need.
  • Load the schema and describe ambiguous columns, business terms, and relationships in project Knowledge.
  • Ask a specific question with a metric, time range, grouping, and any exclusions.
  • Read the generated SQL, confirm filters and joins, then explicitly run it in the workspace.
  • Check the answer against a known result. Manually approve an executed question/SQL pair only when you want it promoted to Knowledge.

When a text to SQL tool helps

Analysts can draft recurring reporting queries and inspect unfamiliar schemas faster. Developers can integrate query generation into internal tools through the API. Managers can ask business questions in a connected workspace and discuss the SQL and evidence with a data owner.

Text to SQL does not make an incorrect metric definition correct. Missing relationships, duplicate rows after a join, incomplete data, and ambiguous dates can all produce plausible but misleading results. Keep review and a known answer in the loop.

Query examples

Prompts mapped to concrete SQL.

Answers before you connect a database.

What is text to SQL?

Text to SQL is the translation of a plain-language question into a SQL query. Useful results depend on database schema, business definitions, and query review.

Can I use TTSQL for free?

The Starter plan includes 20 requests per day and one PostgreSQL project. Paid plans offer higher limits and additional database access; current limits are listed on the homepage.

Will TTSQL run every generated query automatically?

No. The query workspace lets you review the SQL and explicitly run it. The public API generates SQL and reports executed: false.

Bring your next question to TTSQL.

Start with one PostgreSQL project and 20 free requests a day. Explore your data, build a report, or integrate the API.