Ask your Postgres database questions in plain English (Supabase, Neon and any PostgreSQL)
Connect a PostgreSQL, Supabase or Neon database to GPTExcel and get answers, tables and Excel files without writing SQL. Read-only, limited to the tables you choose, with the SQL shown for every answer.
Most questions about a business end in a database: how many orders shipped last month, which customers stopped buying, what the average basket was in each country. If you don't write SQL, each one is a request to someone who does, and a wait. This post shows how to ask those questions yourself, in GPTExcel's chat, against your own PostgreSQL database.
The example is an online shop whose app runs on Supabase, with orders, order_items, customers and
products tables. The same steps work for Neon and for any other PostgreSQL server.
1. Connect the database, read-only
In GPTExcel, open Settings → Connectors and click Supabase under Add a connector.
In Supabase, click Connect, choose Session pooler, and copy the connection string. Paste it into Paste a connection URL and add the database password. To have GPTExcel verify the server's certificate, download the CA certificate from Project Settings → Database → SSL configuration and paste it into the form. Then click Save and test.
Two things are worth doing before you ask anything:
- Use a read-only user. GPTExcel only runs read-only statements, but a database user that can only
SELECTmakes that a rule on your side too. Copy the read-only user script in the form gives you the SQL to create one. - Choose tables. After the test passes, Choose tables lets you pick what the AI may read. Supabase's own
schemas (
auth,storageand the rest) are already left out, so the shop's tables are all it sees. Leave out anything you don't want in a chat, such as a table of API keys.
The database guide covers Neon, plain PostgreSQL, allowing GPTExcel's fixed IP address, and what each error means.
2. Ask a first question
Start a chat, open the + menu in the message box, choose Connect a database and tick the shop's connection. Then ask:
How many orders did we get each month this year, and how much revenue?
GPTExcel first reads the structure of the tables it needs, which shows as a Schema card. Then it writes a
query, runs it and answers. The Query card holds the result table and the SQL it ran, so you can check the
logic: which date column it grouped by, whether it summed total or subtotal, whether cancelled orders were
included.
If the answer isn't what you meant, say so in plain English:
Leave out cancelled and refunded orders, and use the date the order was paid.
It rewrites the query and runs it again.
3. Go further than one table
Questions that need joins are where plain English saves the most time:
Which 10 customers spent the most in the last 90 days, and when did each of them first order?
Which products are most often bought together?
Show average order value by country for the last two quarters, side by side.
GPTExcel does the joins and aggregation in SQL, so each answer comes from a small, exact result instead of from reading whole tables into the chat.
4. Turn the answer into a file
A table in the chat is often not the end. On paid plans GPTExcel can export a query's full result as a Parquet or CSV file, and its Python sandbox picks it up from there:
Export every 2026 order with its items, then build an Excel workbook with revenue by month and by category, and a chart of each.
You get a download card for the workbook. From there you can ask for a pivot table, a slide deck for the monthly review, or save it to Google Drive or OneDrive.
5. What happens when a question goes too far
GPTExcel tells you when it won't run something, and why:
- Writing data. Asked to "mark these orders as shipped", it says it can only read. Statements that would change data or the schema are refused before they reach your database.
- A table you left out. A query that touches a table outside your choice comes back as out of scope, and costs nothing. It can't list hidden tables through PostgreSQL's system catalog either.
- A very expensive query. If the database's planner expects a query to be costly, the card waits for you to click Run anyway, so an unplanned full scan doesn't slow your production database.
- Missing permissions. If the database user can't read a table, the card shows the
GRANTstatement to run.
Tips
- Name the business rules. "Revenue means paid orders, excluding tax and shipping" in your first message saves corrections later.
- Ask for the SQL when you want to reuse it. It's on every query card, ready to paste into your own tools.
- Combine with files. Attach a spreadsheet of targets next to the database and ask how each month did against its target.
- Repeat the files part with a workflow. Once an analysis of an exported file works, "save this as a workflow" keeps the steps for next time. See the workflows guide.