Text to query

Ask business questions. Follow the evidence.

Text to query connects a business question to the database work behind an answer. TTSQL gives managers, founders, analysts, and operations teams a shared way to inspect that work.

Find delivery exceptions
example
prompt

Count undelivered shipments past their promised date, by warehouse.

generated SQL PostgreSQL
1SELECT warehouse_id, COUNT(*) AS overdue_shipments2FROM shipments3WHERE delivered_at IS NULL4  AND promised_at < CURRENT_TIMESTAMP5GROUP BY warehouse_id6ORDER BY overdue_shipments DESC;

Start with the decision you need to make

A CEO may need to understand a change in paid revenue. A product manager may need to compare signup cohorts. An operations lead may need a list of overdue shipments. Each starts with a different decision, but all need a consistent metric and an explainable path back to the data.

Ask the question in a configured project, agree on the definition with the data owner, and review the generated SQL before running it. Successful answer threads can retain result snapshots, narrative, supported visualizations, and citations for the next discussion.

  • Finance and leadership: paid revenue by month, outstanding invoices, or regional performance.
  • Product and customer teams: activity trends, customer segments, and retention questions.
  • Operations: late deliveries, support backlog, and inventory exceptions.

Keep follow-up questions connected

‘Break that down by region’ is only useful if ‘that’ keeps the same revenue definition, dates, and exclusions. Answer threads keep questions together, while clarification and SQL review help surface changes in interpretation.

Describe a recurring reporting need in the dashboard workflow to generate metrics and charts from the project schema. Review its widgets and queries before relying on it for a business decision. Shared dashboards are read-only links; they are not public marketing pages.

What business users need before they start

TTSQL needs a configured database project. Ask a developer or data owner to set up access, verify relationships, and record definitions such as ‘net revenue’ or ‘active account’. Non-technical users benefit most when these decisions are already documented.

For customer-facing analytics, developers can embed SQL generation through the API. The API returns SQL without executing it; the application must provide its own authorized execution workflow.

Query examples

Prompts mapped to concrete SQL.

01 / PostgreSQL

Find delivery exceptions

Count undelivered shipments past their promised date, by warehouse.

Sample schema

shipments(id, warehouse_id, promised_at, delivered_at)
SELECT warehouse_id, COUNT(*) AS overdue_shipments
FROM shipments
WHERE delivered_at IS NULL
  AND promised_at < CURRENT_TIMESTAMP
GROUP BY warehouse_id
ORDER BY overdue_shipments DESC;

This measures the current overdue backlog, not all shipments that were ever late. Align promised_at with your timezone and exclude cancelled shipments if your schema records them separately.

Answers before you connect a database.

Can managers use TTSQL without writing SQL?

Managers can ask questions in plain English once a database project is configured. A data owner should define important metrics, and generated SQL and results should still be reviewed.

Can I chat with my database?

TTSQL provides project-scoped answer threads for questions and follow-ups. SQL execution remains an explicit action, with retained evidence from successful runs.

Does text to query mean the same thing as text to SQL?

Text to SQL names the translation into a query. Text to query can describe the wider experience, including asking follow-ups, inspecting results, and preparing a report.

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.