Skip to main content
7BBusyBoss

English → SQL query

Translates a plain-English question into a SQL query — with explanation + assumptions.

Useful for analysts onboarding to a new schema.

Data & Analyticssqlquery

The prompt

Copy this into ChatGPT, Claude, Gemini or any assistant you already use — then paste your own question + schema (tables + columns) underneath it.

Convert the question into SQL. Output:

**Query** (formatted, runnable)
**Assumptions** (which tables / columns you assumed — flag any you guessed)
**Edge cases** (NULL, duplicates, time zones)
**Sample output shape** (column names + 1 example row)

Rules:
- Standard SQL unless dialect specified.
- Use CTEs over deep subqueries.
- Quote column / table names if reserved.

Example input

Question: How many users signed up last month and are still active? Schema: users(id, created_at, last_seen_at).

Or run it here

112/8000
Output will appear here after you click Run.
Or run in your favourite chatbot

Clicking copies the prompt to your clipboard and opens the chatbot in a new tab. Gemini doesn't accept URL params — paste manually with Ctrl/Cmd+V.

Browse the full free AI prompt library or see more data & analytics prompts.