Skip to content

Swipe right for a newer agent, 48 Hours. Swipe left for an older agent, Deck Rescue.

Issue 82 · 25 Nov 2026 · Easy · Free

Table Talk

Write a SQL query from plain English

Your manager wants to know which customers ordered last quarter but not this one. The data is right there in Postgres, you sort of know what a JOIN is, and you've been on Stack Overflow for 40 minutes.

Category
Coding & Vibe Coding

Sample you can paste

Database: Postgres
Tables:
- customers(id, name, email, country, created_at)
- orders(id, customer_id, total_eur, status, created_at)  -- status is 'paid', 'refunded' or 'cancelled'
Question: which customers ordered in Q3 2026 but haven't ordered at all in Q4 so far? Show name, email, their last order date and what they spent in Q3, biggest spenders first. Ignore cancelled orders.

Steps

  1. Step 1

    Paste your tables

    Table names, column names and types, and which database it is. A couple of made-up example rows help if a column is unclear. No real customer data needed.

  2. Step 2

    Ask your question

    Say what you want to know in normal words, the way you'd ask a colleague. Include what to leave out, like cancelled orders or test accounts.

  3. Step 3

    Get the query

    One query for your database, with comments, plus a plain explanation of each part and any assumption it had to make about your data.

  4. Step 4

    Check it

    A small sanity check to run first, the edge cases that could make the numbers wrong, and how to change the query if the answer looks off.

What you get

What you put in and what you get out

When to use it

Use it when you know exactly what you want to find out, the data is sitting in a database, and the SQL is the only thing in the way.

When to skip it

It can't see your database, so it only knows the columns you paste. Run new queries with a LIMIT or on a copy first. Don't paste real customer data, column names are enough. It writes read-only queries unless you ask for more.

Sample run

0:00

The question

"Who bought in Q3 but hasn't come back in Q4?" Two tables, Postgres, cancelled orders don't count.

Full prompt

table-talk.prompt.txt

You help someone get an answer out of their database. They know the question. You write the SQL, explain it, and help them check it.

INPUT
- Which database (Postgres, MySQL, SQLite, SQL Server, BigQuery, Snowflake...).
- Table names, column names and types, maybe a few example rows.
- The question in plain words, and anything to leave out.

HOW TO WORK
1. Restate the question in one sentence, precisely: what counts, over which dates, per what. If one thing is genuinely ambiguous and would change the result (for example, do refunds count?), ask one short question first. Otherwise pick the sensible reading and say so.
2. Write one query in the dialect of their database. Prefer readable over clever: CTEs with clear names, explicit JOINs, no SELECT *.
3. Comment the query so a beginner can follow it.
4. Handle the usual traps on purpose: NULLs, duplicates from joins, cancelled or test rows, date boundaries and time zones, integer division.
5. Only use tables and columns they gave you. If you need one that isn't there, say so instead of inventing it.

RULES
- Read-only by default: SELECT queries only. If they ask for UPDATE or DELETE, show a SELECT that previews the affected rows first and warn them to run it on a copy or in a transaction.
- Add a LIMIT while testing if the result could be huge.
- Plain words. No lecture about SQL theory.
- Never ask for real personal data. Column names are enough.

OUTPUT
## What I'm answering
One sentence.

## The query
One SQL code block with comments.

## What each part does
3-6 short bullets.

## Assumptions
What you assumed about the data, and the one-line change if it's wrong.

## Check it first
One small query to sanity-check the result, and what number to compare it with.

## If the answer looks off
The 2-3 most likely reasons and how to fix each.

Copied it? Get the Friday roundup. Seven agents and one tip, once a week.

How it works

Most people who need SQL don't need to learn SQL. They have one question, the answer is in a database, and the only thing between them and the number is a JOIN they're not sure about.

This agent writes the query for your database from a plain question and your table names, comments every part, and says out loud what it assumed about your data. That last bit matters most: a query that runs isn't the same as a query that's right.

What to paste

Which database you use, the tables and columns (names and types), and your question in normal words. Say what should be left out. A few made-up example rows help if a column is unclear.

What you get back

One query with comments, a plain explanation of what each part does, the assumptions it made, a quick check to run first, and the edge cases that could make the number wrong.

Questions about Table Talk

Which databases does it work with?

Postgres, MySQL, SQLite, SQL Server, BigQuery, Snowflake and most other SQL databases. Say which one you use, because dates, text matching and limits are written differently in each, and the prompt writes for your dialect.

Do I need to paste my actual data?

No. Table and column names with their types are enough. If a column is unclear, like a status field, add two or three made-up example rows. Leave real names, emails and other personal data out of the chat.

Is Table Talk free?

Yes. The prompt is free to copy, download, and reuse under CC-BY-4.0. There is no sign-up on One Agent a Day. You only need access to a chat model such as ChatGPT, Claude and Gemini.

Which AI tools does Table Talk work in?

It was written for ChatGPT, Claude and Gemini. It is a plain-text prompt, so any capable chat model can run it. Paste the prompt first, then your input.

What do I paste into Table Talk?

Paste your tables. Table names, column names and types, and which database it is. A couple of made-up example rows help if a column is unclear. No real customer data needed.

Compare and find more

Share this agent

Table Talk — You put in Database: Postgres. You get out The check. Free from One Agent a Day.

Share on XShare on LinkedIn
Was this useful?

A yes or no is enough. The note stays on this server's log.

Friday email

The week’s 7 agents, in one email

Every Friday. Seven free prompts, one tip, one “paste this first.” Unsubscribe anytime.

One email, every Friday. Confirm on the next page. Unsubscribe anytime.

The daily agent stays free. Pro waitlist is a separate list, and it is not open yet.

Friday email

The week’s 7 agents, in one email

Every Friday. Seven free prompts, one tip, one “paste this first.” Unsubscribe anytime.

One email, every Friday. Confirm on the next page. Unsubscribe anytime.