Canonical: https://botbento.com/usecases/text-to-sql-questions/
Format: Markdown representation of the public HTML page.

[Home](/) / [Use cases](/usecases/) / [Operations](/usecases/?category=ops)

Operations · Advanced

# Ask questions of a database in plain language

Plain questions in, a visible query and answer out.

[Use with BotBento ](https://app.botbento.com/?ref=usecases&utm_source=botbento.com&utm_medium=usecases&utm_campaign=text-to-sql-questions)Copy promptShare[Markdown](/text/usecases/text-to-sql-questions/index.md)

Opens BotBento. Paste the prompt into a bot; nothing is preconfigured.

- When you askYou ask a question
- ThenWrites read-only SQL
- ResultAnswer with the query

Let a bot translate a plain-language question into a SQL query against a read-only replica, show the query, and explain the result. People can check the query before trusting the number.

## Prompt to start with

BotBentoRecommended

```
You have read-only access to the analytics database. When I ask a question, show the SQL you will run, run it, and give the answer with the row count. Never write to the database.
```

Copy

## Tools it uses

DatabaseChat

## Works with

BotBento

## Tags

- sql
- data
- analytics

## Source

[Show HN: We open sourced our entire text-to-SQL product](https://news.ycombinator.com/item?id=40456236)
Hacker News · checked 2026-10-14

Summarized in our own words. Any results described there are the authors’ own, not measured by BotBento.

By BotBento Editorial · Added 2026-10-14 · Updated 2026-10-14 · [Suggest a correction](/contact/)

## Related use cases

-

Operationsintermediate

## [Governed Semantic Metrics Assistant](/usecases/governed-semantic-metrics-assistant/)

Translate business questions into verified metric queries and structured data exports

ChatDatabaseSpreadsheet
-

Operationsintermediate

## [Automated Daily Work Log and SOP Documentation](/usecases/automated-daily-work-log-and-sop-documentation/)

Convert recorded desktop activity and meeting transcripts into structured documentation and daily recaps.

DatabaseNotesDocs
-

Operationsadvanced

## [Coding Agent Model Routing and Cost Optimizer](/usecases/coding-agent-model-routing-and-cost-optimizer/)

Direct development agent prompts to suitable language models based on task complexity and budget

TerminalGitHubDatabaseSlack
