Guides

How to Query Business Data with Plain English

Arkzero ResearchMar 27, 20267 min read

Last updated Mar 27, 2026

Text-to-SQL tools let you ask questions about your business data in plain English and get accurate database queries back without writing a single line of SQL. In 2026, leading tools including Vanna.ai, SQLAI.ai, and SQL Chat achieve 85 to 95 percent accuracy on standard queries and connect directly to databases like PostgreSQL, MySQL, Snowflake, and BigQuery. Analysts report cutting query time by 60 percent after adopting these tools.
A business professional reviewing data query results on a modern laptop in an office setting

Text-to-SQL tools translate plain-English questions into SQL queries by reading your database schema and using a large language model to generate the correct syntax. You connect the tool once, then ask questions the same way you would ask a colleague. No SQL knowledge is required. Tools like Vanna.ai 2.0, SQLAI.ai, and SQL Chat support PostgreSQL, MySQL, Snowflake, BigQuery, and most business databases out of the box.

What Text-to-SQL Actually Does

When you connect a text-to-SQL tool to your database, it reads the table names, column names, and data types from your schema. It stores that structure and uses it as context when you type a question. So when you ask "what were our top 10 customers by revenue last quarter?", the tool is not guessing. It sees that you have a customers table with a total_revenue column and a created_at field, and generates a SELECT query using those exact field names.

This schema-aware approach is what separates dedicated text-to-SQL tools from simply pasting your question into a general-purpose AI. A general model has no idea what columns your database contains. A connected tool knows exactly.

Most tools follow a four-step process: read your schema, accept your plain-English question, generate dialect-specific SQL (PostgreSQL syntax differs from BigQuery syntax), and validate the query before running it. The validation step catches common errors before they fail on your database.

The Tools Worth Using in 2026

Vanna.ai 2.0 is the most capable option for teams running production databases. Released in late 2025, Vanna 2.0 moved from a simple SQL generation library to an agent-based framework with row-level access control, audit logging, and user-aware context. It connects to PostgreSQL, MySQL, Snowflake, BigQuery, Redshift, SQLite, Oracle, SQL Server, DuckDB, and ClickHouse. Best for analytics teams and companies with sensitive data requirements.

SQLAI.ai takes a more modular approach. Beyond generating queries, it includes separate tools for explaining existing SQL, formatting and optimizing queries, and analyzing CSV data. This makes it useful for mixed teams where some members can write SQL and others cannot. Best for teams that want more than just query generation.

SQL Chat uses a conversational interface where you describe what you want and refine it through follow-up questions. It supports MySQL, PostgreSQL, MSSQL, and TiDB Cloud. The approach works like talking to a junior analyst: describe the question, review what the tool produces, and ask follow-ups to refine. Best for smaller teams and one-off queries.

DBHub takes a different angle. It is a Model Context Protocol (MCP) server that gives AI assistants like Claude direct access to your database. Instead of opening a separate tool, you stay in your existing workflow and ask database questions inline. DBHub reached over 100,000 downloads and 2,000 GitHub stars as of early 2026, making it one of the fastest-adopted tools in the text-to-SQL category.

Setting Up Vanna.ai Step by Step

This walkthrough uses Vanna.ai because it supports the widest range of databases and has the most straightforward setup path for non-developers.

Step 1: Install the library

Open a terminal and run:

pip install vanna

If Python is not installed, Vanna also offers a hosted web interface where you can connect your database through a browser without writing any code.

Step 2: Connect your database

In the hosted interface, click "Connect Database" and enter your database credentials. For PostgreSQL, the connection string looks like:

postgresql://username:password@host:port/database_name

Vanna reads your schema at this point. It does not download your data, only the table and column structure.

Step 3: Add business context to your schema

Vanna improves accuracy significantly when you add plain-English descriptions of what your tables mean:

  • "The orders table contains one row per customer purchase."
  • "The arr column in accounts is annual recurring revenue in US dollars."
  • "Closed-won deals have a stage value of 7."

These descriptions help Vanna resolve ambiguous questions correctly. The more context you add, the fewer follow-up iterations you need per question.

Step 4: Ask your first question

Type a question in plain English:

  • "How many new customers signed up this month?"
  • "Which product category has the highest return rate?"
  • "Show me the five sales reps with the most deals closed in Q1."

Vanna generates the SQL, shows you the query before running it, and displays results as a table or chart.

Writing Questions That Get Accurate Results

According to benchmark data from AI2SQL using the BIRD-Bench evaluation framework, text-to-SQL tools achieve 85 to 95 percent accuracy on standard SELECT queries, JOINs, GROUP BY operations, and WHERE clauses in 2026. Accuracy drops when questions are vague or ambiguous. Analysts who adopt these tools report cutting query writing time by 60 percent on average, with most of the gains coming from routine reporting tasks that previously required a data team ticket.

Questions that produce good results:

  • Specific time ranges: "January through March 2026" instead of "last quarter"
  • Named metrics: "gross margin" instead of "how we did on money"
  • Explicit grouping: "by region" or "by product category"

Questions that produce poor results:

  • "Show me everything about customers"
  • "What is going on with sales?"
  • Anything with multiple possible interpretations and no clarifying detail

When a query comes back wrong, the fastest fix is adding one specific detail. If you asked "which customers are at risk?" and got an unhelpful result, try "which customers have not placed an order in the past 90 days but placed more than three orders in the prior year?".

What These Tools Cannot Do Well

Write operations need manual review. Text-to-SQL tools can generate INSERT, UPDATE, and DELETE queries, but running them without review can destroy data. Most tools flag write operations and require explicit confirmation before execution. Starting with read-only database credentials eliminates this risk during the trial period.

Non-standard naming conventions cause failures. If your database uses abbreviations like cust_ltv_adj without any documentation, the model cannot know that means customer lifetime value adjusted for refunds. Adding schema descriptions in Step 3 is the fix.

Complex multi-step analytical questions sometimes require multiple queries. A question like "compare cohort retention across acquisition channels over the past two years" may need to be broken into separate steps. Tools with conversation memory handle this better than single-turn interfaces.

Performance is not guaranteed. The SQL a tool generates is usually correct but not always efficient. For queries that run against large tables, check execution plans and add indexes separately.

Practical Use Cases by Role

Operations managers use text-to-SQL to pull inventory reports, track fulfillment times, and monitor supplier performance without waiting for a data analyst. Example: "Which suppliers had delivery delays of more than five days in the last 30 days and how many orders were affected?"

Founders and general managers use it for board prep: "What is MRR as of today?" or "Show me net revenue retention by customer segment for the past four quarters."

Sales teams query their CRM database directly: "Which open deals have had no activity in 14 days?" or "What is the average deal size by industry for deals closed in Q1?"

If you work primarily with uploaded files rather than a connected database, VSLZ handles CSV and spreadsheet analysis from a single plain-English prompt with no database connection or configuration needed.

Before You Start: A Practical Checklist

  • Know your database type (PostgreSQL, MySQL, Snowflake, etc.) and have connection credentials ready
  • Start with read-only credentials, not admin access
  • Identify the three to five key tables you want to query and what each represents
  • Write brief descriptions for any columns with non-obvious names
  • Expect to refine your first few questions before results match what you need

Text-to-SQL tools do not replace a data analyst for complex modeling or data engineering work. They remove the queue for routine business questions that currently require a ticket to the data team and a two-day wait for results.

FAQ

Can I use text-to-SQL tools without knowing SQL at all?

Yes. Text-to-SQL tools are designed for users with no SQL knowledge. You type a question in plain English, the tool generates and runs the SQL query, and you see results as a table or chart. The only setup required is connecting your database with credentials, which typically takes 5 to 15 minutes. Vanna.ai also offers a hosted web interface for users who prefer not to install anything locally.

Which databases do text-to-SQL tools support?

Most major databases are supported. Vanna.ai 2.0 works with PostgreSQL, MySQL, Snowflake, BigQuery, Redshift, SQLite, Oracle, SQL Server, DuckDB, and ClickHouse. SQL Chat supports MySQL, PostgreSQL, MSSQL, and TiDB Cloud. SQLAI.ai supports most common relational databases. If your database is not listed, check the tool's documentation for custom connection support via JDBC or direct API.

How accurate are text-to-SQL tools in 2026?

Current tools achieve 85 to 95 percent accuracy on standard queries including SELECTs, JOINs, GROUP BY, and WHERE clauses, based on BIRD-Bench benchmark results published by AI2SQL. Accuracy is highest on well-documented schemas with clear column names. It drops on vague questions, non-standard naming conventions, or complex multi-step analytical queries. Adding plain-English descriptions for your tables and columns significantly improves results.

Is it safe to connect my production database to a text-to-SQL tool?

The primary risk is write operations (INSERT, UPDATE, DELETE). Always start with read-only database credentials to eliminate the risk of accidental data modification. Most reputable tools like Vanna.ai include row-level access control and audit logging for production use. For cloud-hosted tools, review the privacy policy to understand how schema information is stored and whether query history is retained. For sensitive data, self-hosted options like Vanna.ai running on your own infrastructure give full control.

What is the difference between Vanna.ai and SQLAI.ai?

Vanna.ai is best for production environments requiring enterprise features: row-level access control, audit logging, user-aware context, and agentic model support. It is more complex to set up but offers more control. SQLAI.ai is more modular and accessible for first-time users, with separate tools for generating, explaining, and optimizing SQL. If your team includes both technical and non-technical users, SQLAI.ai's explanatory features add extra value. If you are running analytics on a company database with security requirements, Vanna.ai is the stronger choice.

Related