BLUENEXUS INTEGRATIONSHOW-TO

How ops, support and finance can query Postgres without waiting on engineering

In most small companies, the database knows the answer and an engineer is the only way to ask it. How many orders shipped late? Which subscriptions are stuck? What did refunds look like in October? Each one is a message to an engineer, who stops what they're doing, writes a query and pastes the result back. Multiply by a dozen a week.

An AI connected to Postgres can answer most of these in plain English, and show the SQL it ran. The trick is doing it so engineering stays in control: one role it sets up, views it chooses, questions asked where everyone can see them, and a clear line for what still goes to an engineer.

Here's who does what, three prompts, and how a subscription company handles a week of data questions.

Who does what

Who does what

EngineeringOwns the AI's role and views, and decides what it can see.
SupportAsks about orders, payments and customers, for the people writing in.
OperationsAsks about stock, shipping and stuck subscriptions.
FinanceAsks about revenue and refunds, and checks them against other sources.

Set the ground rules

  • One role, set by engineering. The AI connects with a role that can only read chosen views. Our read-only access guide has the SQL.
  • Ask in the open. Questions in a shared channel mean everyone sees the answers, and the same question isn't asked five times.
  • SQL always visible. Every answer shows the query, so anyone can check the table and filter.
  • Agree the definitions. Write down what "active subscriber" and "revenue" mean, and which table holds them.
  • Know when to escalate. Tables the AI can't see, numbers going outside the company, and anything that changes data go to an engineer.

Do it in Claude or ChatGPT

Connect Postgres with our guide to PostgreSQL in Claude, ChatGPT and MCP, using the read-only role. All three prompts only read.

A support question.

1Paste this into Claude or ChatGPT

Using Postgres, how many orders shipped late this week, by warehouse, compared with last week? Show the SQL you ran. Don't change anything.

Copy prompt

An operations question.

1Paste this into Claude or ChatGPT

Which subscriptions have been in pending_activation for more than 3 days? List them with the plan and signup date, and show the SQL. Don't change anything.

Copy prompt

A finance question.

1Paste this into Claude or ChatGPT

Total refunds in October by reason, against September. Show the SQL, and say which table and columns you used for the amount. Don't change anything.

Copy prompt

A few things to know:

  • Check numbers that matter. A wrong join looks as confident as a right one. Compare totals with another source before they go in a report.
  • Ask for shorter periods. A quarter at a time is more likely to stay inside the time limit. Two years at once may not.
  • Save the good ones. A question asked every week deserves an approved query.
  • Name the table. Asking for "refunds from the refunds table" beats hoping the AI picks the right one.

When the whole company asks

On your own, you'd ask your own questions. In a company, Sol's support team, Wren in operations and Marin in finance all ask, and Rowan, the engineering lead, wants to see what's being asked and keep the answers consistent.

Thimble & Co, a 45-person craft supplies subscription company in Portland, asks its data questions in BlueNexus. Postgres is connected with the read-only role on a replica, and questions go in one shared channel. Every Friday at 15:00, the data agent sums up the week's questions, flags answers that need checking, and suggests which to save.

Illustration of the BlueNexus app with example data.

Illustration of the BlueNexus app with example data.

Thirteen questions were answered without an engineer. Finance's refund total is 2% under the payment provider's, and one question needs a table the AI can't read. The agent prepares the next steps for Rowan.

Rowan approves. Marin finds the gap is refunds still pending at the provider, and adds a note to the saved query. Rowan plans a payouts view without bank details.

Illustration of the BlueNexus app with example data.

For connecting Postgres, see PostgreSQL in Claude, ChatGPT and MCP. For setup, see how to give AI read-only access to Postgres. To let your whole team ask data questions, sign up for BlueNexus.

Questions people ask about PostgreSQL and AI

Can non-technical people query a database with AI?

Yes. Connected to Postgres, an AI can turn a plain question into SQL and answer it. Engineering should control what it can read, and the SQL should always be visible.

How accurate is text-to-SQL?

Good for simple questions on well-named tables, weaker on business terms like 'active customer' or 'revenue'. Agree definitions, save approved queries for common questions, and check numbers that matter against another source.

How do I stop AI from seeing sensitive data in Postgres?

Connect it with a role that can only read views you've chosen, without personal data or secrets. See our guide to giving AI read-only access.

Should the AI show its SQL?

Always. Anyone can then check which table and filter it used, and an engineer can spot a wrong join in seconds.

What should go to engineering instead?

Questions about tables the AI can't see, numbers that will be reported outside the company, and anything that needs data changed.

Subscribe to our blog

Product insights, AI and product thinking delivered to your inbox.